Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05d6e6ca78 | ||
|
|
645c5fabf2 | ||
|
|
7f7b6b08e8 | ||
|
|
72d7661b30 | ||
|
|
d0d106cef7 | ||
|
|
d603e94f68 | ||
|
|
9ff61601e3 | ||
|
|
09370a95db | ||
|
|
e9ffc53476 | ||
|
|
480a391929 | ||
|
|
154336ee27 | ||
|
|
d4ccb2e0e6 | ||
|
|
5e65af3a76 | ||
|
|
e4a0f841e1 | ||
|
|
4867a9b1e6 | ||
|
|
9a9eaa8100 | ||
|
|
339e29d5af | ||
|
|
b568999769 | ||
|
|
fe50883c15 | ||
|
|
d13ada1162 | ||
|
|
6ff093efbe | ||
|
|
c3835262d8 | ||
|
|
1a40af74da | ||
|
|
9e6e01cabb | ||
|
|
a561443fca | ||
|
|
e0a0430c31 | ||
|
|
49c3a1cda5 | ||
|
|
ba264c69c2 | ||
|
|
8e500c3670 | ||
|
|
bf4611c7b7 | ||
|
|
f773056750 | ||
|
|
b70500806a | ||
|
|
9b6b54cdaa | ||
|
|
37db6012a7 | ||
|
|
6f176dfc7c | ||
|
|
dee1d68dde | ||
|
|
123ae73efc | ||
|
|
2566992c9a | ||
|
|
5f35203d1b | ||
|
|
c23b73530f | ||
|
|
61dbb92679 | ||
|
|
e3d59a72f9 | ||
|
|
484a9b12bc | ||
|
|
ce81c4f89b | ||
|
|
ef8a4e5aaf |
No files matched your search
+59
-2
@@ -102,6 +102,57 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
|
||||||
|
EEPROM_DRIVER ?= vendor
|
||||||
|
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
||||||
|
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
|
||||||
|
else
|
||||||
|
OPT_DEFS += -DEEPROM_ENABLE
|
||||||
|
ifeq ($(strip $(EEPROM_DRIVER)), custom)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
SRC += eeprom_driver.c
|
||||||
|
else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
|
SRC += eeprom_driver.c eeprom_i2c.c
|
||||||
|
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
SRC += eeprom_driver.c eeprom_transient.c
|
||||||
|
else ifeq ($(strip $(EEPROM_DRIVER)), vendor)
|
||||||
|
OPT_DEFS += -DEEPROM_VENDOR
|
||||||
|
ifeq ($(PLATFORM),AVR)
|
||||||
|
# Automatically provided by avr-libc, nothing required
|
||||||
|
else ifeq ($(PLATFORM),CHIBIOS)
|
||||||
|
ifeq ($(MCU_SERIES), STM32F3xx)
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
# This will effectively work the same as "transient" if not supported by the chip
|
||||||
|
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
||||||
|
endif
|
||||||
|
else ifeq ($(PLATFORM),ARM_ATSAM)
|
||||||
|
SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
|
||||||
|
else ifeq ($(PLATFORM),TEST)
|
||||||
|
SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
|
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
|
||||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||||
@@ -418,9 +469,15 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
|||||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
||||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||||
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \
|
QUANTUM_LIB_SRC += i2c_master.c \
|
||||||
i2c_master.c \
|
|
||||||
i2c_slave.c
|
i2c_slave.c
|
||||||
|
|
||||||
|
SERIAL_DRIVER ?= bitbang
|
||||||
|
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
|
||||||
|
QUANTUM_LIB_SRC += serial.c
|
||||||
|
else
|
||||||
|
QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
* [Getting Help](getting_started_getting_help.md)
|
* [Getting Help](getting_started_getting_help.md)
|
||||||
|
|
||||||
* [Breaking Changes](breaking_changes.md)
|
* [Breaking Changes](breaking_changes.md)
|
||||||
|
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||||
|
|
||||||
* [FAQ](faq.md)
|
* [FAQ](faq.md)
|
||||||
@@ -104,6 +105,7 @@
|
|||||||
* [ADC Driver](adc_driver.md)
|
* [ADC Driver](adc_driver.md)
|
||||||
* [I2C Driver](i2c_driver.md)
|
* [I2C Driver](i2c_driver.md)
|
||||||
* [WS2812 Driver](ws2812_driver.md)
|
* [WS2812 Driver](ws2812_driver.md)
|
||||||
|
* [EEPROM Driver](eeprom_driver.md)
|
||||||
* [GPIO Controls](internals_gpio_control.md)
|
* [GPIO Controls](internals_gpio_control.md)
|
||||||
* [Custom Matrix](custom_matrix.md)
|
* [Custom Matrix](custom_matrix.md)
|
||||||
* [Proton C Conversion](proton_c_conversion.md)
|
* [Proton C Conversion](proton_c_conversion.md)
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# Breaking Changes: My Pull Request Was Flagged
|
||||||
|
|
||||||
|
A QMK member may have replied to your pull request stating that your submission is a breaking change. In their judgment, the changes you have proposed have greater implications for either QMK, or its users.
|
||||||
|
|
||||||
|
Some things that may cause a pull request to be flagged are:
|
||||||
|
|
||||||
|
- **Edits to User Keymaps**
|
||||||
|
A user may submit their keymap to QMK, then some time later open a pull request with further updates, only to find it can't be merged because it was edited in the `qmk/qmk_firmware` repository. As not all users are proficient at using Git or GitHub, the user may find themself unable to fix the issue on their own.
|
||||||
|
- **Changes to Expected Behavior**
|
||||||
|
Changes to QMK behavior may cause users to believe their hardware or QMK is broken if they flash new firmware that incorporates changes to existing QMK features, and find themselves without a means to restore the desired behavior.
|
||||||
|
- **Changes Requiring User Action**
|
||||||
|
Changes may also require action to be taken by users, such as updating a toolchain or taking some action in Git.
|
||||||
|
- **Changes Necessitating Increased Scrutiny**
|
||||||
|
On occasion, a submission may have implications for QMK as a project. This could be copyright/licensing issues, coding conventions, large feature overhauls, "high-risk" changes that need wider testing by our community, or something else entirely.
|
||||||
|
- **Changes Requiring Communication to End Users**
|
||||||
|
This includes warnings about future deprecations, outdated practices, and anything else that needs to be communicated but doesn't fit into one of the above categories.
|
||||||
|
|
||||||
|
## What Do I Do?
|
||||||
|
|
||||||
|
If it is determined that your submission is a breaking change, there are a few things you can do to smooth the process:
|
||||||
|
|
||||||
|
### Consider Splitting Up Your PR
|
||||||
|
|
||||||
|
If you are contributing core code, and the only reason it needs to go through breaking changes is that you are updating keymaps to match your change, consider whether you can submit your feature in a way that the old keymaps continue to work. Then submit a separate PR that goes through the breaking changes process to remove the old code.
|
||||||
|
|
||||||
|
### Contribute a ChangeLog Entry
|
||||||
|
|
||||||
|
We require submissions that go through the Breaking Change process to include a changelog entry. The entry should be a short summary of the changes your pull request makes – [each section here started as a changelog](ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft").
|
||||||
|
|
||||||
|
Your changelog should be located at `docs/ChangeLog/YYYYMMDD/PR####.md`, where `YYYYMMDD` is the date on which QMK's breaking change branch – usually named `future` – will be merged into the `master` branch, and `####` is the number of your pull request.
|
||||||
|
|
||||||
|
If your submission requires action on the part of users, your changelog should instruct users what action(s) must be taken, or link to a location that does so.
|
||||||
|
|
||||||
|
### Document Your Changes
|
||||||
|
|
||||||
|
Understanding the purpose for your submission, and possible implications or actions it will require can make the review process more straightforward. A changelog may suffice for this purpose, but more extensive changes may require a level of detail that is ill-suited for a changelog.
|
||||||
|
|
||||||
|
Commenting on your pull request and being responsive to questions, comments, and change requests is much appreciated.
|
||||||
|
|
||||||
|
### Ask for Help
|
||||||
|
|
||||||
|
Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/Uq7gcHh).
|
||||||
+16
-2
@@ -141,14 +141,28 @@ qmk docs [-p PORT]
|
|||||||
|
|
||||||
## `qmk doctor`
|
## `qmk doctor`
|
||||||
|
|
||||||
This command examines your environment and alerts you to potential build or flash problems.
|
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||||
|
|
||||||
**Usage**:
|
**Usage**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk doctor
|
qmk doctor [-y] [-n]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
Check your environment for problems and prompt to fix them:
|
||||||
|
|
||||||
|
qmk doctor
|
||||||
|
|
||||||
|
Check your environment and automatically fix any problems found:
|
||||||
|
|
||||||
|
qmk doctor -y
|
||||||
|
|
||||||
|
Check your environment and report problems only:
|
||||||
|
|
||||||
|
qmk doctor -n
|
||||||
|
|
||||||
## `qmk json-keymap`
|
## `qmk json-keymap`
|
||||||
|
|
||||||
Creates a keymap.c from a QMK Configurator export.
|
Creates a keymap.c from a QMK Configurator export.
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# EEPROM Driver Configuration
|
||||||
|
|
||||||
|
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
||||||
|
|
||||||
|
Driver | Description
|
||||||
|
--------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
`EEPROM_DRIVER = vendor` | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. Other chips will generally act as "transient" below.
|
||||||
|
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
||||||
|
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
||||||
|
|
||||||
|
## Vendor Driver Configuration
|
||||||
|
|
||||||
|
No configurable options are available.
|
||||||
|
|
||||||
|
## I2C Driver Configuration
|
||||||
|
|
||||||
|
Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h:
|
||||||
|
|
||||||
|
`config.h` override | Description | Default Value
|
||||||
|
------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------
|
||||||
|
`#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS` | Base I2C address for the EEPROM -- shifted left by 1 as per i2c_master requirements | 0b10100000
|
||||||
|
`#define EXTERNAL_EEPROM_I2C_ADDRESS(addr)` | Calculated I2C address for the EEPROM | `(EXTERNAL_EEPROM_I2C_BASE_ADDRESS)`
|
||||||
|
`#define EXTERNAL_EEPROM_BYTE_COUNT` | Total size of the EEPROM in bytes | 8192
|
||||||
|
`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32
|
||||||
|
`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2
|
||||||
|
`#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5
|
||||||
|
|
||||||
|
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`.
|
||||||
|
|
||||||
|
Alternatively, there are pre-defined hardware configurations for available chips/modules:
|
||||||
|
|
||||||
|
Module | Equivalent `#define` | Source
|
||||||
|
-----------------|---------------------------------|------------------------------------------
|
||||||
|
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
|
||||||
|
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
|
||||||
|
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
|
||||||
|
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
|
||||||
|
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
|
||||||
|
|
||||||
|
?> If you find that the EEPROM is not cooperating, ensure you've correctly shifted up your EEPROM address by 1. For example, the datasheet might state the address as `0b01010000` -- the correct value of `EXTERNAL_EEPROM_I2C_BASE_ADDRESS` needs to be `0b10100000`.
|
||||||
|
|
||||||
|
## Transient Driver configuration
|
||||||
|
|
||||||
|
The only configurable item for the transient EEPROM driver is its size:
|
||||||
|
|
||||||
|
`config.h` override | Description | Default Value
|
||||||
|
------------------------------- | ----------------------------------------- | -------------
|
||||||
|
`#define TRANSIENT_EEPROM_SIZE` | Total size of the EEPROM storage in bytes | 64
|
||||||
|
|
||||||
|
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_transient.h`.
|
||||||
@@ -33,3 +33,7 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in
|
|||||||
## IS31FL3733
|
## IS31FL3733
|
||||||
|
|
||||||
Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
|
Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
|
||||||
|
|
||||||
|
## 24xx series external I2C EEPROM
|
||||||
|
|
||||||
|
Support for an external I2C-based EEPROM instead of using the on-chip EEPROM. For more information on how to setup the driver see the [EEPROM Driver](eeprom_driver.md) page.
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "eeprom_driver.h"
|
||||||
|
|
||||||
|
void eeprom_driver_init(void) {
|
||||||
|
/* Any initialisation code */
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_driver_erase(void) {
|
||||||
|
/* Wipe out the EEPROM, setting values to zero */
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
|
/*
|
||||||
|
Read a block of data:
|
||||||
|
buf: target buffer
|
||||||
|
addr: 0-based offset within the EEPROM
|
||||||
|
len: length to read
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
|
/*
|
||||||
|
Write a block of data:
|
||||||
|
buf: target buffer
|
||||||
|
addr: 0-based offset within the EEPROM
|
||||||
|
len: length to write
|
||||||
|
*/
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "eeprom_driver.h"
|
||||||
|
|
||||||
|
uint8_t eeprom_read_byte(const uint8_t *addr) {
|
||||||
|
uint8_t ret;
|
||||||
|
eeprom_read_block(&ret, addr, 1);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t eeprom_read_word(const uint16_t *addr) {
|
||||||
|
uint16_t ret;
|
||||||
|
eeprom_read_block(&ret, addr, 2);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t eeprom_read_dword(const uint32_t *addr) {
|
||||||
|
uint32_t ret;
|
||||||
|
eeprom_read_block(&ret, addr, 4);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_byte(uint8_t *addr, uint8_t value) { eeprom_write_block(&value, addr, 1); }
|
||||||
|
|
||||||
|
void eeprom_write_word(uint16_t *addr, uint16_t value) { eeprom_write_block(&value, addr, 2); }
|
||||||
|
|
||||||
|
void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_block(&value, addr, 4); }
|
||||||
|
|
||||||
|
void eeprom_update_block(const void *buf, void *addr, size_t len) {
|
||||||
|
uint8_t read_buf[len];
|
||||||
|
eeprom_read_block(read_buf, addr, len);
|
||||||
|
if (memcmp(buf, read_buf, len) != 0) {
|
||||||
|
eeprom_write_block(buf, addr, len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_update_byte(uint8_t *addr, uint8_t value) {
|
||||||
|
uint8_t orig = eeprom_read_byte(addr);
|
||||||
|
if (orig != value) {
|
||||||
|
eeprom_write_byte(addr, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_update_word(uint16_t *addr, uint16_t value) {
|
||||||
|
uint16_t orig = eeprom_read_word(addr);
|
||||||
|
if (orig != value) {
|
||||||
|
eeprom_write_word(addr, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_update_dword(uint32_t *addr, uint32_t value) {
|
||||||
|
uint32_t orig = eeprom_read_dword(addr);
|
||||||
|
if (orig != value) {
|
||||||
|
eeprom_write_dword(addr, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "eeprom.h"
|
||||||
|
|
||||||
|
void eeprom_driver_init(void);
|
||||||
|
void eeprom_driver_erase(void);
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
Note that the implementations of eeprom_XXXX_YYYY on AVR are normally
|
||||||
|
provided by avr-libc. The same functions are reimplemented below and are
|
||||||
|
rerouted to the external i2c equivalent.
|
||||||
|
|
||||||
|
Seemingly, as this is compiled from within QMK, the object file generated
|
||||||
|
during the build overrides the avr-libc implementation during the linking
|
||||||
|
stage.
|
||||||
|
|
||||||
|
On other platforms such as ARM, there are no provided implementations, so
|
||||||
|
there is nothing to override during linkage.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "wait.h"
|
||||||
|
#include "i2c_master.h"
|
||||||
|
#include "eeprom.h"
|
||||||
|
#include "eeprom_i2c.h"
|
||||||
|
|
||||||
|
// #define DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
|
#ifdef DEBUG_EEPROM_OUTPUT
|
||||||
|
# include "print.h"
|
||||||
|
#endif // DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
|
static inline void init_i2c_if_required(void) {
|
||||||
|
static int done = 0;
|
||||||
|
if (!done) {
|
||||||
|
i2c_init();
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||||
|
intptr_t p = (intptr_t)addr;
|
||||||
|
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
||||||
|
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF;
|
||||||
|
p >>= 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_driver_init(void) {}
|
||||||
|
|
||||||
|
void eeprom_driver_erase(void) {
|
||||||
|
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
|
||||||
|
memset(buf, 0x00, EXTERNAL_EEPROM_PAGE_SIZE);
|
||||||
|
for (intptr_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
|
||||||
|
eeprom_write_block(buf, (void *)addr, EXTERNAL_EEPROM_PAGE_SIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
|
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE];
|
||||||
|
fill_target_address(complete_packet, addr);
|
||||||
|
|
||||||
|
init_i2c_if_required();
|
||||||
|
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
|
||||||
|
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), buf, len, 100);
|
||||||
|
|
||||||
|
#ifdef DEBUG_EEPROM_OUTPUT
|
||||||
|
dprintf("[EEPROM R] 0x%04X: ", ((int)addr));
|
||||||
|
for (size_t i = 0; i < len; ++i) {
|
||||||
|
dprintf(" %02X", (int)(((uint8_t *)buf)[i]));
|
||||||
|
}
|
||||||
|
dprintf("\n");
|
||||||
|
#endif // DEBUG_EEPROM_OUTPUT
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
|
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE];
|
||||||
|
uint8_t *read_buf = (uint8_t *)buf;
|
||||||
|
intptr_t target_addr = (intptr_t)addr;
|
||||||
|
|
||||||
|
init_i2c_if_required();
|
||||||
|
while (len > 0) {
|
||||||
|
intptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
||||||
|
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
||||||
|
if (write_length > len) {
|
||||||
|
write_length = len;
|
||||||
|
}
|
||||||
|
|
||||||
|
fill_target_address(complete_packet, (const void *)target_addr);
|
||||||
|
for (uint8_t i = 0; i < write_length; i++) {
|
||||||
|
complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + i] = read_buf[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_EEPROM_OUTPUT
|
||||||
|
dprintf("[EEPROM W] 0x%04X: ", ((int)target_addr));
|
||||||
|
for (uint8_t i = 0; i < write_length; i++) {
|
||||||
|
dprintf(" %02X", (int)(read_buf[i]));
|
||||||
|
}
|
||||||
|
dprintf("\n");
|
||||||
|
#endif // DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
|
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
|
||||||
|
wait_ms(EXTERNAL_EEPROM_WRITE_TIME);
|
||||||
|
|
||||||
|
read_buf += write_length;
|
||||||
|
target_addr += write_length;
|
||||||
|
len -= write_length;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/*
|
||||||
|
Default device configurations:
|
||||||
|
|
||||||
|
For the Sparkfun Qwiic I2C EEPROM module: https://www.sparkfun.com/products/14764
|
||||||
|
#define EEPROM_I2C_CAT24C512 // (part number 24512A)
|
||||||
|
#define EEPROM_I2C_RM24C512C // (part number 24512C)
|
||||||
|
|
||||||
|
For the Sparkfun I2C EEPROM chip: https://www.sparkfun.com/products/525
|
||||||
|
#define EEPROM_I2C_24LC256
|
||||||
|
|
||||||
|
For the Adafruit I2C FRAM chip: https://www.adafruit.com/product/1895
|
||||||
|
#define EEPROM_I2C_MB85RC256V
|
||||||
|
*/
|
||||||
|
#if defined(EEPROM_I2C_CAT24C512)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 65536
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
|
#elif defined(EEPROM_I2C_RM24C512C)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 65536
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 3
|
||||||
|
#elif defined(EEPROM_I2C_24LC256)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 64
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
|
#elif defined(EEPROM_I2C_24LC128)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 16384
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 64
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
|
#elif defined(EEPROM_I2C_MB85RC256V)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The base I2C address of the EEPROM.
|
||||||
|
This needs to be shifted up by 1, to match i2c_master requirements.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_I2C_BASE_ADDRESS
|
||||||
|
# define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The calculated I2C address based on the input memory location.
|
||||||
|
|
||||||
|
For EEPROM chips that embed part of the memory location in the I2C address
|
||||||
|
such as AT24M02 you can use something similar to the following (ensuring the
|
||||||
|
result is shifted by left by 1):
|
||||||
|
|
||||||
|
#define EXTERNAL_EEPROM_I2C_ADDRESS(loc) \
|
||||||
|
(EXTERNAL_EEPROM_I2C_BASE_ADDRESS | ((((loc) >> 16) & 0x07) << 1))
|
||||||
|
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_I2C_ADDRESS
|
||||||
|
# define EXTERNAL_EEPROM_I2C_ADDRESS(loc) (EXTERNAL_EEPROM_I2C_BASE_ADDRESS)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The total size of the EEPROM, in bytes. The EEPROM datasheet will usually
|
||||||
|
specify this value in kbits, and will require conversion to bytes.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_BYTE_COUNT
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 8192
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The page size in bytes of the EEPROM, as specified in the datasheet.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_PAGE_SIZE
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The address size in bytes of the EEPROM. For EEPROMs with <=256 bytes, this
|
||||||
|
will likely be 1. For EEPROMs >256 and <=65536, this will be 2. For EEPROMs
|
||||||
|
>65536, this will likely need to be 2 with the modified variant of
|
||||||
|
EXTERNAL_EEPROM_I2C_ADDRESS above.
|
||||||
|
|
||||||
|
As expected, consult the datasheet for specifics of your EEPROM.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_ADDRESS_SIZE
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The write cycle time of the EEPROM in milliseconds, as specified in the
|
||||||
|
datasheet.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_WRITE_TIME
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "eeprom_driver.h"
|
||||||
|
#include "eeprom_transient.h"
|
||||||
|
|
||||||
|
__attribute__((aligned(4))) static uint8_t transientBuffer[TRANSIENT_EEPROM_SIZE] = {0};
|
||||||
|
|
||||||
|
size_t clamp_length(intptr_t offset, size_t len) {
|
||||||
|
if (offset + len > TRANSIENT_EEPROM_SIZE) {
|
||||||
|
len = TRANSIENT_EEPROM_SIZE - offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_driver_init(void) { eeprom_driver_erase(); }
|
||||||
|
|
||||||
|
void eeprom_driver_erase(void) { memset(transientBuffer, 0x00, TRANSIENT_EEPROM_SIZE); }
|
||||||
|
|
||||||
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
|
intptr_t offset = (intptr_t)addr;
|
||||||
|
memset(buf, 0x00, len);
|
||||||
|
len = clamp_length(offset, len);
|
||||||
|
if (len > 0) {
|
||||||
|
memcpy(buf, &transientBuffer[offset], len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
|
intptr_t offset = (intptr_t)addr;
|
||||||
|
len = clamp_length(offset, len);
|
||||||
|
if (len > 0) {
|
||||||
|
memcpy(&transientBuffer[offset], buf, len);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/* Copyright 2019 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/*
|
||||||
|
The size of the transient EEPROM buffer size.
|
||||||
|
*/
|
||||||
|
#ifndef TRANSIENT_EEPROM_SIZE
|
||||||
|
# include "eeconfig.h"
|
||||||
|
# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO
|
||||||
|
#endif
|
||||||
@@ -48,8 +48,6 @@ void led_set_user(uint8_t usb_led){
|
|||||||
} else {
|
} else {
|
||||||
//set to Hi-Z
|
//set to Hi-Z
|
||||||
setPinInput(B0);
|
setPinInput(B0);
|
||||||
writePinLow(B0);
|
|
||||||
setPinInput(D5);
|
setPinInput(D5);
|
||||||
writePinLow(D5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,9 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
}
|
}
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
|
||||||
//#define DIODE_DIRECTION CUSTOM_MATRIX
|
|
||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F0, B6, B5 }
|
#define MATRIX_COL_PINS { F0, B6, B5 }
|
||||||
#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 }
|
#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 }
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define BACKLIGHT_PIN C6
|
#define BACKLIGHT_PIN C6
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ CHANGELOG:
|
|||||||
0.6 - Swapped ESC and GRV in all layers.
|
0.6 - Swapped ESC and GRV in all layers.
|
||||||
0.7 - Brought code up to current standards.
|
0.7 - Brought code up to current standards.
|
||||||
0.8 - Added MACLOCK macro.
|
0.8 - Added MACLOCK macro.
|
||||||
|
0.9 - Updated code to correspond to new setPinInput behaviour
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
@@ -124,9 +125,7 @@ void matrix_init_user(void) {
|
|||||||
#ifdef BOOTLOADER_CATERINA
|
#ifdef BOOTLOADER_CATERINA
|
||||||
// This will disable the red LEDs on the ProMicros
|
// This will disable the red LEDs on the ProMicros
|
||||||
setPinInput(D5);
|
setPinInput(D5);
|
||||||
writePinLow(D5);
|
|
||||||
setPinInput(B0);
|
setPinInput(B0);
|
||||||
writePinLow(B0);
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h
|
|||||||
### 0.7
|
### 0.7
|
||||||
* Brought code up to new standards (as of 27 June 2019).
|
* Brought code up to new standards (as of 27 June 2019).
|
||||||
* Updated this readme file.
|
* Updated this readme file.
|
||||||
|
### 0.8
|
||||||
|
* Added MACLOCK macro.
|
||||||
|
### 0.9
|
||||||
|
* Updated code to correspond to new setPinInput behaviour.
|
||||||
|
|
||||||
### TODO:
|
### TODO:
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
@@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
|
#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN F5
|
// #define BACKLIGHT_PIN F5
|
||||||
|
|||||||
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// dynamic keymaps start after this.
|
// dynamic keymaps start after this.
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
||||||
|
|
||||||
|
// VIA lighting is handled by the keyboard-level code
|
||||||
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
|
||||||
|
// Let VIA handle the QMK RGBLIGHT
|
||||||
|
#define VIA_QMK_RGBLIGHT_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// dynamic keymaps start after this.
|
// dynamic keymaps start after this.
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
||||||
|
|
||||||
|
// VIA lighting is handled by the keyboard-level code
|
||||||
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
|
||||||
|
// Let VIA handle the QMK RGBLIGHT
|
||||||
|
#define VIA_QMK_RGBLIGHT_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// dynamic keymaps start after this.
|
// dynamic keymaps start after this.
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
||||||
|
|
||||||
|
// VIA lighting is handled by the keyboard-level code
|
||||||
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
|
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21
|
||||||
|
|
||||||
|
// VIA lighting is handled by the keyboard-level code
|
||||||
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -3,3 +3,5 @@
|
|||||||
void backlight_task(void);
|
void backlight_task(void);
|
||||||
void breathing_interrupt_disable(void);
|
void breathing_interrupt_disable(void);
|
||||||
void breathing_interrupt_enable(void);
|
void breathing_interrupt_enable(void);
|
||||||
|
void breathing_enable(void);
|
||||||
|
void breathing_disable(void);
|
||||||
@@ -55,6 +55,54 @@ backlight_config_t kb_backlight_config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef VIA_ENABLE
|
#ifdef VIA_ENABLE
|
||||||
|
|
||||||
|
void backlight_get_value( uint8_t *data )
|
||||||
|
{
|
||||||
|
uint8_t *value_id = &(data[0]);
|
||||||
|
uint8_t *value_data = &(data[1]);
|
||||||
|
switch (*value_id)
|
||||||
|
{
|
||||||
|
case id_qmk_backlight_brightness:
|
||||||
|
{
|
||||||
|
// level / BACKLIGHT_LEVELS * 255
|
||||||
|
value_data[0] = ((uint16_t)kb_backlight_config.level) * 255 / BACKLIGHT_LEVELS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_qmk_backlight_effect:
|
||||||
|
{
|
||||||
|
value_data[0] = kb_backlight_config.breathing ? 1 : 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_set_value( uint8_t *data )
|
||||||
|
{
|
||||||
|
uint8_t *value_id = &(data[0]);
|
||||||
|
uint8_t *value_data = &(data[1]);
|
||||||
|
switch (*value_id)
|
||||||
|
{
|
||||||
|
case id_qmk_backlight_brightness:
|
||||||
|
{
|
||||||
|
// level / 255 * BACKLIGHT_LEVELS
|
||||||
|
kb_backlight_config.level = ((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255;
|
||||||
|
backlight_set(kb_backlight_config.level);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_qmk_backlight_effect:
|
||||||
|
{
|
||||||
|
if ( value_data[0] == 0 ) {
|
||||||
|
kb_backlight_config.breathing = false;
|
||||||
|
breathing_disable();
|
||||||
|
} else {
|
||||||
|
kb_backlight_config.breathing = true;
|
||||||
|
breathing_enable();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void raw_hid_receive_kb( uint8_t *data, uint8_t length )
|
void raw_hid_receive_kb( uint8_t *data, uint8_t length )
|
||||||
{
|
{
|
||||||
uint8_t *command_id = &(data[0]);
|
uint8_t *command_id = &(data[0]);
|
||||||
@@ -139,6 +187,21 @@ void raw_hid_receive_kb( uint8_t *data, uint8_t length )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case id_lighting_set_value:
|
||||||
|
{
|
||||||
|
backlight_set_value(command_data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_lighting_get_value:
|
||||||
|
{
|
||||||
|
backlight_get_value(command_data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_lighting_save:
|
||||||
|
{
|
||||||
|
backlight_config_save();
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
// Unhandled message.
|
// Unhandled message.
|
||||||
|
|||||||
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// dynamic keymaps start after this.
|
// dynamic keymaps start after this.
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
||||||
|
|
||||||
|
// VIA lighting is handled by the keyboard-level code
|
||||||
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
|
||||||
|
// Let VIA handle the QMK RGBLIGHT
|
||||||
|
#define VIA_QMK_RGBLIGHT_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -126,8 +126,86 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return process_record_user(keycode, record);;
|
return process_record_user(keycode, record);;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VIA_ENABLE
|
||||||
|
|
||||||
|
void backlight_get_value( uint8_t *data )
|
||||||
|
{
|
||||||
|
uint8_t *value_id = &(data[0]);
|
||||||
|
uint8_t *value_data = &(data[1]);
|
||||||
|
switch (*value_id)
|
||||||
|
{
|
||||||
|
case id_qmk_backlight_brightness:
|
||||||
|
{
|
||||||
|
// level / BACKLIGHT_LEVELS * 255
|
||||||
|
value_data[0] = ((uint16_t)kb_backlight_config.level) * 255 / BACKLIGHT_LEVELS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_qmk_backlight_effect:
|
||||||
|
{
|
||||||
|
value_data[0] = kb_backlight_config.breathing ? 1 : 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void backlight_set_value( uint8_t *data )
|
||||||
|
{
|
||||||
|
uint8_t *value_id = &(data[0]);
|
||||||
|
uint8_t *value_data = &(data[1]);
|
||||||
|
switch (*value_id)
|
||||||
|
{
|
||||||
|
case id_qmk_backlight_brightness:
|
||||||
|
{
|
||||||
|
// level / 255 * BACKLIGHT_LEVELS
|
||||||
|
kb_backlight_config.level = ((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255;
|
||||||
|
backlight_set(kb_backlight_config.level);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_qmk_backlight_effect:
|
||||||
|
{
|
||||||
|
if ( value_data[0] == 0 ) {
|
||||||
|
kb_backlight_config.breathing = false;
|
||||||
|
breathing_disable();
|
||||||
|
} else {
|
||||||
|
kb_backlight_config.breathing = true;
|
||||||
|
breathing_enable();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void raw_hid_receive_kb( uint8_t *data, uint8_t length )
|
||||||
|
{
|
||||||
|
uint8_t *command_id = &(data[0]);
|
||||||
|
uint8_t *command_data = &(data[1]);
|
||||||
|
switch ( *command_id )
|
||||||
|
{
|
||||||
|
case id_lighting_set_value:
|
||||||
|
{
|
||||||
|
backlight_set_value(command_data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_lighting_get_value:
|
||||||
|
{
|
||||||
|
backlight_get_value(command_data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case id_lighting_save:
|
||||||
|
{
|
||||||
|
backlight_config_save();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
// Unhandled message.
|
||||||
|
*command_id = id_unhandled;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// DO NOT call raw_hid_send(data,length) here, let caller do this
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// In the case of VIA being disabled, we still need to check if
|
// In the case of VIA being disabled, we still need to check if
|
||||||
|
|||||||
@@ -4,3 +4,5 @@ void backlight_task(void);
|
|||||||
void breathing_interrupt_disable(void);
|
void breathing_interrupt_disable(void);
|
||||||
void breathing_interrupt_enable(void);
|
void breathing_interrupt_enable(void);
|
||||||
void breathing_toggle(void);
|
void breathing_toggle(void);
|
||||||
|
void breathing_enable(void);
|
||||||
|
void breathing_disable(void);
|
||||||
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// dynamic keymaps start after this.
|
// dynamic keymaps start after this.
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
|
||||||
|
|
||||||
|
// VIA lighting is handled by the keyboard-level code
|
||||||
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
|
||||||
|
// Let VIA handle the QMK RGBLIGHT
|
||||||
|
#define VIA_QMK_RGBLIGHT_ENABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
// #define UNUSED_PINS { B14 }
|
// #define UNUSED_PINS { B14 }
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
//#define BACKLIGHT_PIN B7
|
//#define BACKLIGHT_PIN B7
|
||||||
|
|||||||
@@ -54,25 +54,3 @@
|
|||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
//#define NO_ACTION_MACRO
|
||||||
//#define NO_ACTION_FUNCTION
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
/* Backlight configuration
|
|
||||||
*/
|
|
||||||
#define BACKLIGHT_LEVELS 1
|
|
||||||
|
|
||||||
/* Underlight configuration
|
|
||||||
*/
|
|
||||||
#define RGB_DI_PIN D7
|
|
||||||
#define RGBLED_NUM 18 // Number of LEDs
|
|
||||||
#define RGBLIGHT_HUE_STEP 32
|
|
||||||
#define RGBLIGHT_SAT_STEP 17
|
|
||||||
#define RGBLIGHT_VAL_STEP 17
|
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
|
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
|
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel
|
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "rev4.h"
|
#include "rev4.h"
|
||||||
//#include "backlight.h"
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
@@ -8,49 +7,19 @@ void matrix_init_kb(void) {
|
|||||||
led_init_ports();
|
led_init_ports();
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_init_ports(void) {
|
|
||||||
print("init_backlight_pin()\n");
|
|
||||||
// Set our LED pins as output
|
|
||||||
//DDRD |= (1<<6); // Esc
|
|
||||||
//DDRB |= (1<<7); // Page Up
|
|
||||||
//DDRD |= (1<<4); // Arrows
|
|
||||||
|
|
||||||
// Set our LED pins low
|
|
||||||
//PORTD &= ~(1<<6); // Esc
|
|
||||||
//PORTB &= ~(1<<7); // Page Up
|
|
||||||
//PORTD &= ~(1<<4); // Arrows
|
|
||||||
}
|
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
|
||||||
/*
|
|
||||||
if ( level == 0 ) {
|
|
||||||
// Turn off light
|
|
||||||
PORTD |= (1<<6); // Esc
|
|
||||||
PORTB |= (1<<7); // Page Up
|
|
||||||
PORTD |= (1<<4); // Arrows
|
|
||||||
} else {
|
|
||||||
// Turn on light
|
|
||||||
PORTD &= ~(1<<6); // Esc
|
|
||||||
PORTB &= ~(1<<7); // Page Up
|
|
||||||
PORTD &= ~(1<<4); // Arrows
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_init_ports() {
|
void led_init_ports() {
|
||||||
// Set our LED pins as output
|
// Set our LED pins as output
|
||||||
palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); // LED1
|
setPinOutput(B13); // LED1
|
||||||
palClearPad(GPIOB, 13);
|
writePinLow(B13);
|
||||||
palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); // LED2
|
|
||||||
palClearPad(GPIOB, 14);
|
setPinOutput(B14); // LED2
|
||||||
palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED3
|
writePinLow(B14);
|
||||||
palClearPad(GPIOA, 8);
|
|
||||||
palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); // Capslock LED
|
setPinOutput(B8); // LED3
|
||||||
palClearPad(GPIOA, 0);
|
writePinLow(B8);
|
||||||
|
|
||||||
|
setPinOutput(B0); // Capslock LED
|
||||||
|
writePinLow(B0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
|||||||
@@ -4,18 +4,17 @@ MCU = STM32F303
|
|||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BACKLIGHT_ENABLE = yes
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality
|
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
MIDI_ENABLE = no # MIDI controls
|
MIDI_ENABLE = no # MIDI controls
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = yes
|
|
||||||
|
|
||||||
LAYOUTS = 66_ansi 66_iso
|
LAYOUTS = 66_ansi 66_iso
|
||||||
@@ -23,8 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define CUSTOM_MATRIX 2
|
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x0001
|
#define PRODUCT_ID 0x0001
|
||||||
#define DEVICE_VER 0x0100
|
#define DEVICE_VER 0x0100
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define CUSTOM_MATRIX 2
|
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x3333
|
#define PRODUCT_ID 0x3333
|
||||||
#define DEVICE_VER 0x0100
|
#define DEVICE_VER 0x0100
|
||||||
|
|||||||
@@ -18,12 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
// do not #include "config_common.h" because the pin names conflict with the USB HID code.
|
|
||||||
// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves.
|
|
||||||
// It's a hack, yeah...
|
|
||||||
|
|
||||||
#define CUSTOM_MATRIX 2
|
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x005B
|
#define PRODUCT_ID 0x005B
|
||||||
@@ -36,9 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 16
|
#define MATRIX_ROWS 16
|
||||||
#define MATRIX_COLS 16
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
/* matrix scanning is done in custom_matrix.cpp */
|
|
||||||
//#define DIODE_DIRECTION
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 }
|
#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
// #define BACKLIGHT_PIN B7
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F0, C7, C6, B6, }
|
#define MATRIX_COL_PINS { F0, C7, C6, B6, }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
// #define BACKLIGHT_PIN B7
|
||||||
|
|||||||
+177
-15
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012 Jun Wako <[email protected]>
|
Copyright 2020
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0xB1E5
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER KPREPUBLIC
|
#define MANUFACTURER KPrepublic
|
||||||
#define PRODUCT COSPAD
|
#define PRODUCT Cospad
|
||||||
#define DESCRIPTION QMK keyboard firmware for COSPAD
|
#define DESCRIPTION 6x4 numpad with underglow and backlighting
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 6
|
#define MATRIX_ROWS 6
|
||||||
@@ -40,22 +40,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 }
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 }
|
||||||
#define MATRIX_COL_PINS { F0, F1, E6, C7 }
|
#define MATRIX_COL_PINS { F0, F1, E6, C7 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Backlight configuration */
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
#define BACKLIGHT_PIN F7
|
#define BACKLIGHT_PIN F7
|
||||||
#define BACKLIGHT_LEVELS 1
|
// #define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
#define BACKLIGHT_ON_STATE 0
|
||||||
|
|
||||||
/* Underlight configuration */
|
|
||||||
#define RGB_DI_PIN F6
|
#define RGB_DI_PIN F6
|
||||||
#define RGBLED_NUM 4
|
#ifdef RGB_DI_PIN
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLED_NUM 4
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
@@ -64,10 +93,89 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
//#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
@@ -83,8 +191,62 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_LAYER
|
//#define NO_ACTION_LAYER
|
||||||
//#define NO_ACTION_TAPPING
|
//#define NO_ACTION_TAPPING
|
||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
/* disable these deprecated features by default */
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
/* Bootmagic Lite key configuration */
|
/* Bootmagic Lite key configuration */
|
||||||
// #define BOOTMAGIC_LITE_ROW 0
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
|||||||
+11
-12
@@ -1,5 +1,4 @@
|
|||||||
|
/* Copyright 2020
|
||||||
/* Copyright 2019
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,18 +15,18 @@
|
|||||||
*/
|
*/
|
||||||
#include "cospad.h"
|
#include "cospad.h"
|
||||||
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
void keyboard_pre_init_kb(void) {
|
||||||
|
led_init_ports();
|
||||||
void backlight_init_ports(void) {
|
keyboard_pre_init_user();
|
||||||
setPinOutput(F7);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
void led_init_ports(void) {
|
||||||
writePin(F7, !!level);
|
setPinOutput(B2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void backlight_task(void) {
|
bool led_update_kb(led_t led_state) {
|
||||||
// do nothing - as default implementation of software PWM does not work
|
if (led_update_user(led_state)) {
|
||||||
|
writePin(B2, !led_state.num_lock);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //BACKLIGHT_ENABLE
|
|
||||||
+82
-81
@@ -1,5 +1,4 @@
|
|||||||
|
/* Copyright 2020
|
||||||
/* Copyright 2019
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,12 +13,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define ___ KC_NO
|
#define ___ KC_NO
|
||||||
|
|
||||||
/* This a shortcut to help you visually see your layout.
|
/* This is a shortcut to help you visually see your layout.
|
||||||
*
|
*
|
||||||
* The first section contains all of the arguments representing the physical
|
* The first section contains all of the arguments representing the physical
|
||||||
* layout of the board and position of the keys.
|
* layout of the board and position of the keys.
|
||||||
@@ -28,100 +29,100 @@
|
|||||||
* represents the switch matrix.
|
* represents the switch matrix.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* COSPAD ortho matrix layout
|
/* 6x4 ortholinear layout
|
||||||
* ,-------------------.
|
* ,-------------------.
|
||||||
* | 00 | 01 | 02 | 03 |
|
* | 00 | 01 | 02 | 03 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 10 | 11 | 12 | 13 |
|
* | 10 | 11 | 12 | 13 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 20 | 21 | 22 | 23 |
|
* | 20 | 21 | 22 | 23 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 30 | 31 | 32 | 33 |
|
* | 30 | 31 | 32 | 33 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 40 | 41 | 42 | 43 |
|
* | 40 | 41 | 42 | 43 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 50 | 51 | 52 | 53 |
|
* | 50 | 51 | 52 | 53 |
|
||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
#define LAYOUT_ortho_6x4( \
|
#define LAYOUT_ortho_6x4( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, k23, \
|
k20, k21, k22, k23, \
|
||||||
k30, k31, k32, k33, \
|
k30, k31, k32, k33, \
|
||||||
k40, k41, k42, k43, \
|
k40, k41, k42, k43, \
|
||||||
k50, k51, k52, k53 \
|
k50, k51, k52, k53 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{k00, k01, k02, k03}, \
|
{ k00, k01, k02, k03 }, \
|
||||||
{k10, k11, k12, k13}, \
|
{ k10, k11, k12, k13 }, \
|
||||||
{k20, k21, k22, k23}, \
|
{ k20, k21, k22, k23 }, \
|
||||||
{k30, k31, k32, k33}, \
|
{ k30, k31, k32, k33 }, \
|
||||||
{k40, k41, k42, k43}, \
|
{ k40, k41, k42, k43 }, \
|
||||||
{k50, k51, k52, k53} \
|
{ k50, k51, k52, k53 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* COSPAD gamepad matrix layout
|
/* 6x4 gamepad layout
|
||||||
* ,-------------------.
|
* ,-------------------.
|
||||||
* | 00 | 01 | 02 | 03 |
|
* | 00 | 01 | 02 | 03 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 10 | 11 | 12 | 13 |
|
* | 10 | 11 | 12 | 13 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 20 | 21 | 22 | |
|
* | 20 | 21 | 22 | |
|
||||||
* |----|----|----| 23 |
|
* |----|----|----| 23 |
|
||||||
* | 30 | 31 | 32 | |
|
* | 30 | 31 | 32 | |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 40 | 41 | 42 | 43 |
|
* | 40 | 41 | 42 | 43 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 50 | 51 | 52 | 53 |
|
* | 50 | 51 | 52 | 53 |
|
||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
#define LAYOUT_gamepad_6x4( \
|
#define LAYOUT_gamepad_6x4( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, \
|
k20, k21, k22, \
|
||||||
k30, k31, k32, k23, \
|
k30, k31, k32, k23, \
|
||||||
k40, k41, k42, k43, \
|
k40, k41, k42, k43, \
|
||||||
k50, k51, k52, k53 \
|
k50, k51, k52, k53 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{k00, k01, k02, k03}, \
|
{ k00, k01, k02, k03 }, \
|
||||||
{k10, k11, k12, k13}, \
|
{ k10, k11, k12, k13 }, \
|
||||||
{k20, k21, k22, k23}, \
|
{ k20, k21, k22, k23 }, \
|
||||||
{k30, k31, k32, ___}, \
|
{ k30, k31, k32, ___ }, \
|
||||||
{k40, k41, k42, k43}, \
|
{ k40, k41, k42, k43 }, \
|
||||||
{k50, k51, k52, k53} \
|
{ k50, k51, k52, k53 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* COSPAD numpad matrix layout
|
/* 6x4 numpad layout
|
||||||
* ,-------------------.
|
* ,-------------------.
|
||||||
* | 00 | 01 | 02 | 03 |
|
* | 00 | 01 | 02 | 03 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 10 | 11 | 12 | 13 |
|
* | 10 | 11 | 12 | 13 |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 20 | 21 | 22 | |
|
* | 20 | 21 | 22 | |
|
||||||
* |----|----|----| 23 |
|
* |----|----|----| 23 |
|
||||||
* | 30 | 31 | 32 | |
|
* | 30 | 31 | 32 | |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 40 | 41 | 42 | |
|
* | 40 | 41 | 42 | |
|
||||||
* |----|----|----| 43 |
|
* |----|----|----| 43 |
|
||||||
* | 50 | 52 | |
|
* | 50 | 52 | |
|
||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
#define LAYOUT_numpad_6x4( \
|
#define LAYOUT_numpad_6x4( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, \
|
k20, k21, k22, \
|
||||||
k30, k31, k32, k23, \
|
k30, k31, k32, k23, \
|
||||||
k40, k41, k42, \
|
k40, k41, k42, \
|
||||||
k50, k52, k43 \
|
k50, k52, k43 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{k00, k01, k02, k03}, \
|
{ k00, k01, k02, k03 }, \
|
||||||
{k10, k11, k12, k13}, \
|
{ k10, k11, k12, k13 }, \
|
||||||
{k20, k21, k22, k23}, \
|
{ k20, k21, k22, k23 }, \
|
||||||
{k30, k31, k32, ___}, \
|
{ k30, k31, k32, ___ }, \
|
||||||
{k40, k41, k42, k43}, \
|
{ k40, k41, k42, k43 }, \
|
||||||
{k50, ___, k52, ___} \
|
{ k50, ___, k52, ___ } \
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add backwards compatibility for existing keymaps
|
// Add backwards compatibility for existing keymaps
|
||||||
|
|||||||
+102
-90
@@ -1,95 +1,107 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Cospad",
|
"keyboard_name": "Cospad",
|
||||||
"keyboard_folder": "cospad",
|
"url": "",
|
||||||
"url": "",
|
"maintainer": "qmk",
|
||||||
"maintainer": "qmk",
|
"width": 4,
|
||||||
"width": 4,
|
"height": 6,
|
||||||
"height": 6,
|
"layouts": {
|
||||||
"layouts": {
|
"LAYOUT_numpad_6x4": {
|
||||||
"LAYOUT_numpad_6x4": {
|
"key_count": 21,
|
||||||
"key_count": 21,
|
"layout": [
|
||||||
"layout": [
|
{"x":0, "y":0},
|
||||||
{"label":"Esc", "x":0, "y":0},
|
{"x":1, "y":0},
|
||||||
{"label":"Tab", "x":1, "y":0},
|
{"x":2, "y":0},
|
||||||
{"label":"Fn", "x":2, "y":0},
|
{"x":3, "y":0},
|
||||||
{"label":"Back", "x":3, "y":0},
|
|
||||||
{"label":"Num Lock", "x":0, "y":1},
|
|
||||||
{"label":"/", "x":1, "y":1},
|
|
||||||
{"label":"*", "x":2, "y":1},
|
|
||||||
{"label":"-", "x":3, "y":1},
|
|
||||||
{"label":"7", "x":0, "y":2},
|
|
||||||
{"label":"8", "x":1, "y":2},
|
|
||||||
{"label":"9", "x":2, "y":2},
|
|
||||||
{"label":"4", "x":0, "y":3},
|
|
||||||
{"label":"5", "x":1, "y":3},
|
|
||||||
{"label":"6", "x":2, "y":3},
|
|
||||||
{"label":"+", "x":3, "y":2, "h":2},
|
|
||||||
{"label":"1", "x":0, "y":4},
|
|
||||||
{"label":"2", "x":1, "y":4},
|
|
||||||
{"label":"3", "x":2, "y":4},
|
|
||||||
{"label":"0", "x":0, "y":5, "w":2},
|
|
||||||
{"label":".", "x":2, "y":5},
|
|
||||||
{"label":"Enter", "x":3, "y":4, "h":2}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
"LAYOUT_gamepad_6x4": {
|
{"x":0, "y":1},
|
||||||
"key_count": 23,
|
{"x":1, "y":1},
|
||||||
"layout": [
|
{"x":2, "y":1},
|
||||||
{"label":"k00", "x":0, "y":0},
|
{"x":3, "y":1},
|
||||||
{"label":"k01", "x":1, "y":0},
|
|
||||||
{"label":"k02", "x":2, "y":0},
|
|
||||||
{"label":"k03", "x":3, "y":0},
|
|
||||||
{"label":"k10", "x":0, "y":1},
|
|
||||||
{"label":"k11", "x":1, "y":1},
|
|
||||||
{"label":"k12", "x":2, "y":1},
|
|
||||||
{"label":"k13", "x":3, "y":1},
|
|
||||||
{"label":"k20", "x":0, "y":2},
|
|
||||||
{"label":"k21", "x":1, "y":2},
|
|
||||||
{"label":"k22", "x":2, "y":2},
|
|
||||||
{"label":"k30", "x":0, "y":3},
|
|
||||||
{"label":"k31", "x":1, "y":3},
|
|
||||||
{"label":"k32", "x":2, "y":3},
|
|
||||||
{"label":"k23", "x":3, "y":2, "h":2},
|
|
||||||
{"label":"k40", "x":0, "y":4},
|
|
||||||
{"label":"k41", "x":1, "y":4},
|
|
||||||
{"label":"k42", "x":2, "y":4},
|
|
||||||
{"label":"k43", "x":3, "y":4},
|
|
||||||
{"label":"k50", "x":0, "y":5},
|
|
||||||
{"label":"k51", "x":1, "y":5},
|
|
||||||
{"label":"k52", "x":2, "y":5},
|
|
||||||
{"label":"k53", "x":3, "y":5}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
"LAYOUT_ortho_6x4": {
|
{"x":0, "y":2},
|
||||||
"key_count": 24,
|
{"x":1, "y":2},
|
||||||
"layout": [
|
{"x":2, "y":2},
|
||||||
{"label":"k00", "x":0, "y":0},
|
|
||||||
{"label":"k01", "x":1, "y":0},
|
{"x":0, "y":3},
|
||||||
{"label":"k02", "x":2, "y":0},
|
{"x":1, "y":3},
|
||||||
{"label":"k03", "x":3, "y":0},
|
{"x":2, "y":3},
|
||||||
{"label":"k10", "x":0, "y":1},
|
{"x":3, "y":2, "h":2},
|
||||||
{"label":"k11", "x":1, "y":1},
|
|
||||||
{"label":"k12", "x":2, "y":1},
|
{"x":0, "y":4},
|
||||||
{"label":"k13", "x":3, "y":1},
|
{"x":1, "y":4},
|
||||||
{"label":"k20", "x":0, "y":2},
|
{"x":2, "y":4},
|
||||||
{"label":"k21", "x":1, "y":2},
|
|
||||||
{"label":"k22", "x":2, "y":2},
|
{"x":0, "y":5, "w":2},
|
||||||
{"label":"k23", "x":3, "y":2},
|
{"x":2, "y":5},
|
||||||
{"label":"k30", "x":0, "y":3},
|
{"x":3, "y":4, "h":2}
|
||||||
{"label":"k31", "x":1, "y":3},
|
]
|
||||||
{"label":"k32", "x":2, "y":3},
|
},
|
||||||
{"label":"k33", "x":3, "y":3},
|
"LAYOUT_gamepad_6x4": {
|
||||||
{"label":"k40", "x":0, "y":4},
|
"key_count": 23,
|
||||||
{"label":"k41", "x":1, "y":4},
|
"layout": [
|
||||||
{"label":"k42", "x":2, "y":4},
|
{"x":0, "y":0},
|
||||||
{"label":"k43", "x":3, "y":4},
|
{"x":1, "y":0},
|
||||||
{"label":"k50", "x":0, "y":5},
|
{"x":2, "y":0},
|
||||||
{"label":"k51", "x":1, "y":5},
|
{"x":3, "y":0},
|
||||||
{"label":"k52", "x":2, "y":5},
|
|
||||||
{"label":"k53", "x":3, "y":5}
|
{"x":0, "y":1},
|
||||||
]
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":2, "h":2},
|
||||||
|
|
||||||
|
{"x":0, "y":4},
|
||||||
|
{"x":1, "y":4},
|
||||||
|
{"x":2, "y":4},
|
||||||
|
{"x":3, "y":4},
|
||||||
|
|
||||||
|
{"x":0, "y":5},
|
||||||
|
{"x":1, "y":5},
|
||||||
|
{"x":2, "y":5},
|
||||||
|
{"x":3, "y":5}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_6x4": {
|
||||||
|
"key_count": 24,
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
{"x":3, "y":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":3},
|
||||||
|
|
||||||
|
{"x":0, "y":4},
|
||||||
|
{"x":1, "y":4},
|
||||||
|
{"x":2, "y":4},
|
||||||
|
{"x":3, "y":4},
|
||||||
|
|
||||||
|
{"x":0, "y":5},
|
||||||
|
{"x":1, "y":5},
|
||||||
|
{"x":2, "y":5},
|
||||||
|
{"x":3, "y":5}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,60 +1,57 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Defines names for use in layer keycodes and the keymap
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
enum layer_names {
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
_BL,
|
||||||
// entirely and just use numbers.
|
_FL
|
||||||
enum layers {
|
|
||||||
_BL = 0,
|
|
||||||
_FL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap _BL: (Base Layer) Default Layer
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
* ,-------------------.
|
* ,-------------------.
|
||||||
* |Esc |TAB | FN | BS |
|
* |Esc |TAB | FN | BS |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | NL | / | * | - |
|
* | NL | / | * | - |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 7 | 8 | 9 | |
|
* | 7 | 8 | 9 | |
|
||||||
* |----|----|----| + |
|
* |----|----|----| + |
|
||||||
* | 4 | 5 | 6 | |
|
* | 4 | 5 | 6 | |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* | 1 | 2 | 3 | |
|
* | 1 | 2 | 3 | |
|
||||||
* |----|----|----| En |
|
* |----|----|----| En |
|
||||||
* | 0 | . | |
|
* | 0 | . | |
|
||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT_numpad_6x4(
|
[_BL] = LAYOUT_numpad_6x4(
|
||||||
KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \
|
KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
|
||||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
KC_P7, KC_P8, KC_P9, \
|
KC_P7, KC_P8, KC_P9,
|
||||||
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
KC_P1, KC_P2, KC_P3, \
|
KC_P1, KC_P2, KC_P3,
|
||||||
KC_P0, KC_PDOT, KC_PENT
|
KC_P0, KC_PDOT, KC_PENT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap _FL: Function Layer
|
/* Keymap _FL: Function Layer
|
||||||
* ,-------------------.
|
* ,-------------------.
|
||||||
* |RGBT| | | |
|
* |RGBT| | | |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* |RGBM|RGBP|BTOG| |
|
* |RGBM|RGBP|BTOG| |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* |HUD |HUI |BON | |
|
* |HUD |HUI |BON | |
|
||||||
* |----|----|----| |
|
* |----|----|----| |
|
||||||
* |SAD |SAI |BOFF| |
|
* |SAD |SAI |BOFF| |
|
||||||
* |----|----|----|----|
|
* |----|----|----|----|
|
||||||
* |VAD |VAS |BSTP| |
|
* |VAD |VAS |BSTP| |
|
||||||
* |----|----|----| |
|
* |----|----|----| |
|
||||||
* | |RST | |
|
* | |RST | |
|
||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
[_FL] = LAYOUT_numpad_6x4(
|
[_FL] = LAYOUT_numpad_6x4(
|
||||||
RGB_TOG, _______, _______, _______, \
|
RGB_TOG, _______, _______, _______,
|
||||||
RGB_MOD, RGB_M_P, BL_TOGG, _______, \
|
RGB_MOD, RGB_M_P, BL_TOGG, _______,
|
||||||
RGB_HUD, RGB_HUI, BL_ON, \
|
RGB_HUD, RGB_HUI, BL_ON,
|
||||||
RGB_SAD, RGB_SAI, BL_OFF, _______, \
|
RGB_SAD, RGB_SAI, BL_OFF, _______,
|
||||||
RGB_VAD, RGB_VAI, BL_STEP, \
|
RGB_VAD, RGB_VAI, BL_STEP,
|
||||||
_______, RESET, _______
|
_______, RESET, _______
|
||||||
),
|
)
|
||||||
};
|
};
|
||||||
@@ -1,18 +1,15 @@
|
|||||||
COSPAD
|
# Cospad
|
||||||
===
|
|
||||||
|
|
||||||
A DIY Keypad Kit sold by KPRepublic, runs TKG natively.
|
A DIY keypad kit sold by KPRepublic, runs TKG natively.
|
||||||
|
|
||||||
Keyboard Maintainer: QMK Community
|
* Keyboard Maintainer: QMK Community
|
||||||
Hardware Supported: COSPAD
|
* Hardware Supported: Cospad PCB
|
||||||
Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html)
|
* Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html)
|
||||||
|
|
||||||
Only supports on and off for the backlight leds, as they are not connected to a PWM pin.
|
|
||||||
|
|
||||||
Supported Layouts:
|
Supported Layouts:
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
|||||||
+12
-12
@@ -12,23 +12,23 @@ MCU = atmega32u4
|
|||||||
BOOTLOADER = atmel-dfu
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
BACKLIGHT_CUSTOM_DRIVER = yes
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
|
MIDI_ENABLE = no # MIDI support
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
|
||||||
|
|
||||||
LAYOUTS = numpad_6x4 ortho_6x4
|
LAYOUTS = numpad_6x4 ortho_6x4
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
) \
|
) \
|
||||||
LAYOUT_wrapper( \
|
LAYOUT_wrapper( \
|
||||||
KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||||
MT_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
MT_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \
|
OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \
|
||||||
KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \
|
KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// lower maximum brightness to lower power usage and prevent unresponsiveness
|
// lower maximum brightness to lower power usage and prevent unresponsiveness
|
||||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
|
||||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
|
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||||
|
|
||||||
//disable effects
|
//disable effects
|
||||||
#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue
|
#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
SRC += ./logo_reader.c
|
SRC += ./logo_reader.c
|
||||||
|
|
||||||
# enable OLED displays
|
# enable OLED displays
|
||||||
OLED_DRIVER_ENABLE = yes
|
OLED_DRIVER_ENABLE = no
|
||||||
|
|
||||||
# enable media keys
|
# enable media keys
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
|
|||||||
@@ -52,49 +52,64 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||||
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
||||||
# define RGB_MATRIX_HUE_STEP 8
|
#define RGB_MATRIX_HUE_STEP 4
|
||||||
# define RGB_MATRIX_SAT_STEP 8
|
#define RGB_MATRIX_SAT_STEP 4
|
||||||
# define RGB_MATRIX_VAL_STEP 8
|
#define RGB_MATRIX_VAL_STEP 4
|
||||||
# define RGB_MATRIX_SPD_STEP 10
|
#define RGB_MATRIX_SPD_STEP 10
|
||||||
|
|
||||||
/* Disable the animations you don't want/need. You will need to disable a good number of these *
|
/* Disable the animations you don't want/need. You will need to disable a good number of these *
|
||||||
* because they take up a lot of space. Disable until you can successfully compile your firmware. */
|
* because they take up a lot of space. Disable until you can successfully compile your firmware. */
|
||||||
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||||
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||||
// # define DISABLE_RGB_MATRIX_BREATHING
|
#define DISABLE_RGB_MATRIX_BREATHING
|
||||||
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||||
# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||||
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
#define DISABLE_RGB_MATRIX_BAND_SAT
|
||||||
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||||
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||||
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
#define DISABLE_RGB_MATRIX_BAND_VAL
|
||||||
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
#define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||||
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||||
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||||
# define DISABLE_RGB_MATRIX_RAINDROPS
|
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||||
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||||
# define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||||
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
#define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||||
# define DISABLE_RGB_MATRIX_SPLASH
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||||
# define DISABLE_RGB_MATRIX_MULTISPLASH
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||||
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_SPLASH
|
||||||
|
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||||
#endif
|
#endif
|
||||||
|
// Custom Font path
|
||||||
#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c"
|
#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c"
|
||||||
#define OLED_DISABLE_TIMEOUT
|
#define OLED_DISABLE_TIMEOUT
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// [CRKBD layers Init] -------------------------------------------------------//
|
||||||
|
typedef enum {
|
||||||
|
_QWERTY,
|
||||||
|
_NUM,
|
||||||
|
_SYM,
|
||||||
|
_GAME,
|
||||||
|
_WEAPON
|
||||||
|
}CRKBD_LAYERS;
|
||||||
|
|
||||||
|
extern enum CRKBD_LAYERS crkbd_layers;
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "enums.h"
|
||||||
|
#include "layer.h"
|
||||||
|
|
||||||
// [Init Variables] ----------------------------------------------------------//
|
// [Init Variables] ----------------------------------------------------------//
|
||||||
extern uint8_t is_master;
|
extern uint8_t is_master;
|
||||||
@@ -9,15 +11,6 @@ bool user_led_enabled = true;
|
|||||||
// Boolean to store the master LED clear so it only runs once.
|
// Boolean to store the master LED clear so it only runs once.
|
||||||
bool master_oled_cleared = false;
|
bool master_oled_cleared = false;
|
||||||
|
|
||||||
// [CRKBD layers Init] -------------------------------------------------------//
|
|
||||||
enum crkbd_layers {
|
|
||||||
_QWERTY,
|
|
||||||
_NUM,
|
|
||||||
_SYM,
|
|
||||||
_GAME,
|
|
||||||
_WEAPON
|
|
||||||
};
|
|
||||||
|
|
||||||
// [Keymaps] -----------------------------------------------------------------//
|
// [Keymaps] -----------------------------------------------------------------//
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_QWERTY] = LAYOUT(
|
[_QWERTY] = LAYOUT(
|
||||||
@@ -36,8 +29,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_SYM] = LAYOUT(
|
[_SYM] = LAYOUT(
|
||||||
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
LSFT_T(KC_TAB), RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
|
LSFT_T(KC_TAB), RGB_TOG, KC_MPLY, KC_MUTE, KC_VOLU, KC_VOLD, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
|
||||||
KC_LCTL, RGB_VAD, RGB_RMOD, RGB_HUD, RGB_SAD, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
|
KC_LCTL, KC_CALC, KC_MYCM, KC_MPRV, KC_MNXT, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
|
||||||
LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
|
LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -51,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_WEAPON] = LAYOUT(
|
[_WEAPON] = LAYOUT(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST,
|
||||||
KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
@@ -61,23 +54,24 @@ void keyboard_post_init_user(void) {
|
|||||||
// Set RGB to known state
|
// Set RGB to known state
|
||||||
rgb_matrix_enable_noeeprom();
|
rgb_matrix_enable_noeeprom();
|
||||||
rgb_matrix_set_color_all(RGB_GREEN);
|
rgb_matrix_set_color_all(RGB_GREEN);
|
||||||
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
user_led_enabled = true;
|
user_led_enabled = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
// [Process User Input] ------------------------------------------------------//
|
// [Process User Input] ------------------------------------------------------//
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
|
// Handle RGB Changes sans eeprom - necessary due to the layer dependent RGB color
|
||||||
|
// changes in marrix_scan_user
|
||||||
case RGB_TOG:
|
case RGB_TOG:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
// Toggle matrix on key press
|
// Toggle matrix on key press
|
||||||
user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom();
|
user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom();
|
||||||
} else {
|
// Toggle boolean flag
|
||||||
// Flip User_led_enabled variable on key release
|
user_led_enabled = !user_led_enabled;
|
||||||
user_led_enabled = !user_led_enabled;
|
}
|
||||||
}
|
return false;
|
||||||
return false; // Skip all further processing of this key
|
|
||||||
default:
|
default:
|
||||||
// Use process_record_keymap to reset timer on all other keypresses
|
// Use process_record_keymap to reset timer on all other keypresses to awaken from idle.
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
#ifdef OLED_DRIVER_ENABLE
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
oled_timer = timer_read32();
|
oled_timer = timer_read32();
|
||||||
@@ -91,9 +85,47 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [Matrix Scan] ------------------------------------------------------------//
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
// Iddle timer to return to default layer if left on game layer
|
||||||
|
if (timer_elapsed32(oled_timer) > 380000 && timer_elapsed32(oled_timer) < 479999) {
|
||||||
|
// Reset layer in case it got left on _GAME
|
||||||
|
// This prevents the issue where the master side sometimes wont switch off as expected
|
||||||
|
// in the next step.
|
||||||
|
if (get_highest_layer(layer_state) == _GAME) {
|
||||||
|
layer_off(_GAME);
|
||||||
|
layer_on(_QWERTY);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Timeout to turn off LEDs
|
||||||
|
else if (timer_elapsed32(oled_timer) > 480000) {
|
||||||
|
rgb_matrix_disable_noeeprom();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Set RGB Matrix color based on layers
|
||||||
|
if (user_led_enabled) {
|
||||||
|
switch (get_highest_layer(layer_state)){
|
||||||
|
case _GAME:
|
||||||
|
rgb_matrix_set_color_all(RGB_PURPLE);
|
||||||
|
break;
|
||||||
|
case _NUM:
|
||||||
|
case _SYM:
|
||||||
|
case _QWERTY:
|
||||||
|
rgb_matrix_set_color_all(RGB_GREEN);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rgb_matrix_set_color_all(RGB_GREEN);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rgb_matrix_disable_noeeprom();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
// [OLED Configuration] ------------------------------------------------------//
|
// [OLED Configuration] ------------------------------------------------------//
|
||||||
#ifdef OLED_DRIVER_ENABLE
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
// Init Oled and Rotate....
|
// Init Oled and Rotate....
|
||||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
if (!has_usb())
|
if (!has_usb())
|
||||||
@@ -105,74 +137,6 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|||||||
const char *read_logo(void);
|
const char *read_logo(void);
|
||||||
|
|
||||||
// {OLED helpers} -----------------------------------------------//
|
// {OLED helpers} -----------------------------------------------//
|
||||||
|
|
||||||
// Render Blank Space
|
|
||||||
void render_space(void) {
|
|
||||||
oled_write_ln_P(PSTR(" "), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render separator lines for oled display
|
|
||||||
void render_separator(void) {
|
|
||||||
switch (get_highest_layer(layer_state)){
|
|
||||||
case _GAME:
|
|
||||||
case _WEAPON:
|
|
||||||
oled_write_ln_P(PSTR("===================="), false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render current layer state
|
|
||||||
void render_layer_state(void){
|
|
||||||
// If you want to change the display of OLED, you need to change here
|
|
||||||
switch (get_highest_layer(layer_state)){
|
|
||||||
case _QWERTY:
|
|
||||||
oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
|
|
||||||
break;
|
|
||||||
case _NUM:
|
|
||||||
oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
|
|
||||||
break;
|
|
||||||
case _SYM:
|
|
||||||
oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
|
|
||||||
break;
|
|
||||||
case _GAME:
|
|
||||||
oled_write_ln_P(PSTR("| G A M E ]"), false);
|
|
||||||
break;
|
|
||||||
case _WEAPON:
|
|
||||||
oled_write_ln_P(PSTR("| W E A P O N ]"), false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render USB State
|
|
||||||
void render_usb_state(void) {
|
|
||||||
switch (USB_DeviceState) {
|
|
||||||
case DEVICE_STATE_Unattached:
|
|
||||||
oled_write_ln_P(PSTR("| USB | FREE ]"), false);
|
|
||||||
break;
|
|
||||||
case DEVICE_STATE_Suspended:
|
|
||||||
oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
|
|
||||||
break;
|
|
||||||
case DEVICE_STATE_Configured:
|
|
||||||
oled_write_ln_P(PSTR("| USB | READY ]"), false);
|
|
||||||
break;
|
|
||||||
case DEVICE_STATE_Powered:
|
|
||||||
oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
|
|
||||||
break;
|
|
||||||
case DEVICE_STATE_Default:
|
|
||||||
oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
|
|
||||||
break;
|
|
||||||
case DEVICE_STATE_Addressed:
|
|
||||||
oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render Logo
|
// Render Logo
|
||||||
void render_logo(void) {
|
void render_logo(void) {
|
||||||
oled_write(read_logo(), false);
|
oled_write(read_logo(), false);
|
||||||
@@ -209,7 +173,8 @@ void render_slave_oled(void) {
|
|||||||
|
|
||||||
// {OLED Task} -----------------------------------------------//
|
// {OLED Task} -----------------------------------------------//
|
||||||
void oled_task_user(void) {
|
void oled_task_user(void) {
|
||||||
if (timer_elapsed32(oled_timer) > 80000 && timer_elapsed32(oled_timer) < 479999) {
|
// First time out switches to logo as first indication of iddle.
|
||||||
|
if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) {
|
||||||
// Render logo on both halves before full timeout
|
// Render logo on both halves before full timeout
|
||||||
if (is_master && !master_oled_cleared) {
|
if (is_master && !master_oled_cleared) {
|
||||||
// Clear master OLED once so the logo renders properly
|
// Clear master OLED once so the logo renders properly
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "enums.h"
|
||||||
|
|
||||||
|
// Render Blank Space
|
||||||
|
void render_space(void) {
|
||||||
|
oled_write_ln_P(PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render separator lines for oled display
|
||||||
|
void render_separator(void) {
|
||||||
|
switch (get_highest_layer(layer_state)){
|
||||||
|
case _GAME:
|
||||||
|
case _WEAPON:
|
||||||
|
oled_write_ln_P(PSTR("===================="), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render current layer state
|
||||||
|
void render_layer_state(void){
|
||||||
|
// If you want to change the display of OLED, you need to change here
|
||||||
|
switch (get_highest_layer(layer_state)){
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
|
||||||
|
break;
|
||||||
|
case _NUM:
|
||||||
|
oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
|
||||||
|
break;
|
||||||
|
case _SYM:
|
||||||
|
oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
|
||||||
|
break;
|
||||||
|
case _GAME:
|
||||||
|
oled_write_ln_P(PSTR("| G A M E ]"), false);
|
||||||
|
break;
|
||||||
|
case _WEAPON:
|
||||||
|
oled_write_ln_P(PSTR("| W E A P O N ]"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render USB State
|
||||||
|
void render_usb_state(void) {
|
||||||
|
switch (USB_DeviceState) {
|
||||||
|
case DEVICE_STATE_Unattached:
|
||||||
|
oled_write_ln_P(PSTR("| USB | FREE ]"), false);
|
||||||
|
break;
|
||||||
|
case DEVICE_STATE_Suspended:
|
||||||
|
oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
|
||||||
|
break;
|
||||||
|
case DEVICE_STATE_Configured:
|
||||||
|
oled_write_ln_P(PSTR("| USB | READY ]"), false);
|
||||||
|
break;
|
||||||
|
case DEVICE_STATE_Powered:
|
||||||
|
oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
|
||||||
|
break;
|
||||||
|
case DEVICE_STATE_Default:
|
||||||
|
oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
|
||||||
|
break;
|
||||||
|
case DEVICE_STATE_Addressed:
|
||||||
|
oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// [OLED Helpers] ----------------------------------------------------//
|
||||||
|
// Render empty space on OLED
|
||||||
|
void render_space(void);
|
||||||
|
// Render separator characters for rows
|
||||||
|
void render_separator(void);
|
||||||
|
// Render layer state
|
||||||
|
void render_layer_state(void);
|
||||||
|
// Render USB State
|
||||||
|
void render_usb_state(void);
|
||||||
@@ -8,10 +8,5 @@ RGB_MATRIX_ENABLE = WS2812
|
|||||||
OLED_DRIVER_ENABLE = yes
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
|
||||||
# If you want to change the display of OLED, you need to change here
|
# If you want to change the display of OLED, you need to change here
|
||||||
SRC += ./keyboards/crkbd/keymaps/kidbrazil/logo_reader.c \
|
SRC += logo_reader.c \
|
||||||
#./lib/rgb_state_reader.c \
|
layer.c
|
||||||
#./lib/logo_reader.c \
|
|
||||||
#./lib/keylogger.c \
|
|
||||||
# ./lib/mode_icon_reader.c \
|
|
||||||
# ./lib/host_led_state_reader.c \
|
|
||||||
# ./lib/timelogger.c \
|
|
||||||
+106
-23
@@ -1,13 +1,29 @@
|
|||||||
#ifndef CONFIG_H
|
/*
|
||||||
#define CONFIG_H
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0x1209
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x2328
|
#define PRODUCT_ID 0x7169
|
||||||
#define DEVICE_VER 0x501
|
#define DEVICE_VER 0x0501
|
||||||
#define MANUFACTURER K.T.E.C.
|
#define MANUFACTURER KTEC
|
||||||
#define PRODUCT Daisy
|
#define PRODUCT Daisy
|
||||||
#define DESCRIPTION qmk port for Daisy
|
#define DESCRIPTION qmk port for Daisy
|
||||||
|
|
||||||
@@ -32,22 +48,59 @@
|
|||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL*/
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
#define BACKLIGHT_PIN D0
|
#define BACKLIGHT_PIN D0
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
#define BACKLIGHT_LEVELS 6
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
|
||||||
|
#define RGB_DI_PIN C7
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
# define RGBLED_NUM 8
|
||||||
|
# define RGBLIGHT_HUE_STEP 12
|
||||||
|
# define RGBLIGHT_SAT_STEP 25
|
||||||
|
# define RGBLIGHT_VAL_STEP 12
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
# define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force NKRO
|
* Force NKRO
|
||||||
*
|
*
|
||||||
@@ -81,6 +134,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
/* control how magic key switches layers */
|
/* control how magic key switches layers */
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
@@ -90,8 +147,8 @@
|
|||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
//#define MAGIC_KEY_HELP1 H
|
//#define MAGIC_KEY_HELP H
|
||||||
//#define MAGIC_KEY_HELP2 SLASH
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
//#define MAGIC_KEY_DEBUG D
|
//#define MAGIC_KEY_DEBUG D
|
||||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
//#define MAGIC_KEY_DEBUG_KBD K
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
@@ -99,9 +156,8 @@
|
|||||||
//#define MAGIC_KEY_VERSION V
|
//#define MAGIC_KEY_VERSION V
|
||||||
//#define MAGIC_KEY_STATUS S
|
//#define MAGIC_KEY_STATUS S
|
||||||
//#define MAGIC_KEY_CONSOLE C
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
|
||||||
//#define MAGIC_KEY_LAYER0 0
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
//#define MAGIC_KEY_LAYER1 1
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
//#define MAGIC_KEY_LAYER2 2
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
//#define MAGIC_KEY_LAYER3 3
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
@@ -111,9 +167,11 @@
|
|||||||
//#define MAGIC_KEY_LAYER7 7
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
//#define MAGIC_KEY_LAYER8 8
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
//#define MAGIC_KEY_LAYER9 9
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
//#define MAGIC_KEY_LOCK CAPS
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
//#define MAGIC_KEY_EEPROM E
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
//#define MAGIC_KEY_NKRO N
|
//#define MAGIC_KEY_NKRO N
|
||||||
//#define MAGIC_KEY_SLEEP_LED Z
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
@@ -132,17 +190,12 @@
|
|||||||
//#define NO_ACTION_LAYER
|
//#define NO_ACTION_LAYER
|
||||||
//#define NO_ACTION_TAPPING
|
//#define NO_ACTION_TAPPING
|
||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
// ws2812 options
|
|
||||||
#define RGB_DI_PIN C7 // pin the DI on the ws2812 is hooked-up to
|
|
||||||
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
|
||||||
#define RGBLED_NUM 8 // number of LEDs
|
|
||||||
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
|
||||||
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
|
||||||
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* MIDI options
|
* MIDI options
|
||||||
*/
|
*/
|
||||||
@@ -166,4 +219,34 @@
|
|||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
+32
-12
@@ -1,15 +1,35 @@
|
|||||||
|
/* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "daisy.h"
|
#include "daisy.h"
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
led_init_ports();
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
keyboard_pre_init_user();
|
||||||
// output low
|
}
|
||||||
DDRC |= (1<<PC6);
|
|
||||||
PORTC &= ~(1<<PC6);
|
void led_init_ports(void) {
|
||||||
} else {
|
setPinOutput(C6);
|
||||||
// Hi-Z
|
writePinHigh(C6);
|
||||||
DDRC &= ~(1<<PC6);
|
}
|
||||||
PORTC &= ~(1<<PC6);
|
|
||||||
}
|
bool led_update_kb(led_t led_state) {
|
||||||
led_set_user(usb_led);
|
if (led_update_user(led_state)) {
|
||||||
|
writePin(C6, !led_state.caps_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
+45
-13
@@ -1,19 +1,51 @@
|
|||||||
#ifndef DAISY_H
|
/* Copyright 2020
|
||||||
#define DAISY_H
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||||
K30, K31, K32, K34, K35, K37, K38, K39 \
|
K30, K31, K32, K34, K35, K37, K38, K39 \
|
||||||
) \
|
) { \
|
||||||
{ \
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
|
||||||
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#define LAYOUT_625_space( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||||
|
K30, K31, K32, K35, K38, K39 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||||
|
{ K30, K31, K32, KC_NO, KC_NO, K35, KC_NO, KC_NO, K38, K39, K3A } \
|
||||||
|
}
|
||||||
+103
-14
@@ -1,18 +1,107 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Daisy",
|
"keyboard_name": "Daisy",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 12,
|
"width": 12,
|
||||||
"height": 4,
|
"height": 4,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"key_count": 42,
|
"key_count": 42,
|
||||||
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3, "w": 1.25}, {"label": "K34", "x": 3.5, "y": 3, "w": 2.25}, {"label": "K35", "x": 5.75, "y": 3, "w": 2.75}, {"label": "K37", "x": 8.5, "y": 3, "w": 1.25}, {"label": "K38", "x": 9.75, "y": 3}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}]
|
"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},
|
||||||
|
|
||||||
"LAYOUT_625_space": {
|
{"x": 0, "y": 1, "w": 1.25},
|
||||||
"key_count": 40,
|
{"x": 1.25, "y": 1},
|
||||||
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3}, {"x": 3.25, "y": 3, "w": 6.25}, {"label": "K38", "x": 9.5, "y": 3, "w": 1.25}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}]
|
{"x": 2.25, "y": 1},
|
||||||
|
{"x": 3.25, "y": 1},
|
||||||
|
{"x": 4.25, "y": 1},
|
||||||
|
{"x": 5.25, "y": 1},
|
||||||
|
{"x": 6.25, "y": 1},
|
||||||
|
{"x": 7.25, "y": 1},
|
||||||
|
{"x": 8.25, "y": 1},
|
||||||
|
{"x": 9.25, "y": 1},
|
||||||
|
{"x": 10.25, "y": 1, "w": 1.75},
|
||||||
|
|
||||||
|
{"x": 0, "y": 2, "w": 1.75},
|
||||||
|
{"x": 1.75, "y": 2},
|
||||||
|
{"x": 2.75, "y": 2},
|
||||||
|
{"x": 3.75, "y": 2},
|
||||||
|
{"x": 4.75, "y": 2},
|
||||||
|
{"x": 5.75, "y": 2},
|
||||||
|
{"x": 6.75, "y": 2},
|
||||||
|
{"x": 7.75, "y": 2},
|
||||||
|
{"x": 8.75, "y": 2},
|
||||||
|
{"x": 9.75, "y": 2},
|
||||||
|
{"x": 10.75, "y": 2, "w": 1.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 3, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 3},
|
||||||
|
{"x": 2.25, "y": 3, "w": 1.25},
|
||||||
|
{"x": 3.5, "y": 3, "w": 2.25},
|
||||||
|
{"x": 5.75, "y": 3, "w": 2.75},
|
||||||
|
{"x": 8.5, "y": 3, "w": 1.25},
|
||||||
|
{"x": 9.75, "y": 3},
|
||||||
|
{"x": 10.75, "y": 3, "w": 1.25}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_625_space": {
|
||||||
|
"key_count": 40,
|
||||||
|
"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": 0, "y": 1, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 1},
|
||||||
|
{"x": 2.25, "y": 1},
|
||||||
|
{"x": 3.25, "y": 1},
|
||||||
|
{"x": 4.25, "y": 1},
|
||||||
|
{"x": 5.25, "y": 1},
|
||||||
|
{"x": 6.25, "y": 1},
|
||||||
|
{"x": 7.25, "y": 1},
|
||||||
|
{"x": 8.25, "y": 1},
|
||||||
|
{"x": 9.25, "y": 1},
|
||||||
|
{"x": 10.25, "y": 1, "w": 1.75},
|
||||||
|
|
||||||
|
{"x": 0, "y": 2, "w": 1.75},
|
||||||
|
{"x": 1.75, "y": 2},
|
||||||
|
{"x": 2.75, "y": 2},
|
||||||
|
{"x": 3.75, "y": 2},
|
||||||
|
{"x": 4.75, "y": 2},
|
||||||
|
{"x": 5.75, "y": 2},
|
||||||
|
{"x": 6.75, "y": 2},
|
||||||
|
{"x": 7.75, "y": 2},
|
||||||
|
{"x": 8.75, "y": 2},
|
||||||
|
{"x": 9.75, "y": 2},
|
||||||
|
{"x": 10.75, "y": 2, "w": 1.25},
|
||||||
|
|
||||||
|
{"x": 0, "y": 3, "w": 1.25},
|
||||||
|
{"x": 1.25, "y": 3},
|
||||||
|
{"x": 2.25, "y": 3},
|
||||||
|
{"x": 3.25, "y": 3, "w": 6.25},
|
||||||
|
{"x": 9.5, "y": 3, "w": 1.25},
|
||||||
|
{"x": 10.75, "y": 3, "w": 1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,92 +1,83 @@
|
|||||||
|
/* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
// Layer shorthand
|
enum layer_names {
|
||||||
#define _BL 0
|
_BL,
|
||||||
#define _LW 1
|
_LW,
|
||||||
#define _RS 2
|
_RS
|
||||||
|
|
||||||
enum layer_keycodes {
|
|
||||||
QWERTY = SAFE_RANGE, LOWER, RAISE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LW)
|
||||||
|
#define RAISE MO(_RS)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base Layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
|
||||||
|
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||||
|
* │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
|
||||||
|
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
|
||||||
|
* │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │
|
||||||
|
* ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
|
||||||
|
* │Ctrl│GUI│Alt │ │ Backspace│Lowr│Rse│ Alt│
|
||||||
|
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT(
|
||||||
|
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
/* Base Layer
|
/* Function Layer 1 (Lower)
|
||||||
* .-----------------------------------------------------------------------.
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
* | ESC | Q | W | E | R | T | Y | U | I | O | P | \| |
|
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
|
||||||
* |-----------------------------------------------------------------------|
|
* └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
|
||||||
* | TAB | A | S | D | F | G | H | J | K | L | ENTER |
|
* │ │ = │ ▴ │ │ │ │ [ │ ] │ ; │ ' │ │
|
||||||
* |-----------------------------------------------------------------------|
|
* ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
|
||||||
* | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? |
|
* │ │ ◂ │ ▾ │ ▸ │ │ │ │ │ │ │ │
|
||||||
* |-----------------------------------------------------------------------|
|
* ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
|
||||||
* | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT |
|
* │ │ │ │ │ Delete │ │ │ │
|
||||||
* '-----------------------------------------------------------------------'
|
* └────┴───┴────┴────────└──────────┘────┴───┴────┘
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT(
|
[_LW] = LAYOUT(
|
||||||
GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
_______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
|
_______, _______, _______, _______, KC_DEL, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Function Layer
|
|
||||||
* .-----------------------------------------------------------------------.
|
|
||||||
* | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | =+ | UP | | | | [{ | ]} | ;: | '" | |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | LEFT| DOWN |RIGHT| | | | | | | |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | | | | DELETE | | | |
|
|
||||||
* '-----------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
[_LW] = 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_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS,
|
|
||||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
/* Second Function Layer
|
|
||||||
* .-----------------------------------------------------------------------.
|
|
||||||
* | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| |
|
|
||||||
* |-----------------------------------------------------------------------|
|
|
||||||
* | | | | | | | | |
|
|
||||||
* '-----------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_RS] = LAYOUT(
|
|
||||||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS,
|
|
||||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
};
|
/* Function Layer 2 (Raise)
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
* │Rst│F1 │F2 │F3 │F4 │F5 │F6 │ │Hom│PgU│ │ │
|
||||||
switch (keycode) {
|
* └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
|
||||||
case LOWER:
|
* │ │F7 │F8 │F9 │F10│F11│F12│ │ ; │ ' │ │
|
||||||
if(record->event.pressed){
|
* ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
|
||||||
layer_on(_LW);
|
* │ │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│ │
|
||||||
} else {
|
* ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
|
||||||
layer_off(_LW);
|
* │ │ │ │ │ │ │ │ │
|
||||||
}
|
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
|
||||||
return false;
|
*/
|
||||||
break;
|
[_RS] = LAYOUT(
|
||||||
case RAISE:
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
|
||||||
if(record->event.pressed){
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
|
||||||
layer_on(_RS);
|
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
|
||||||
} else {
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
layer_off(_RS);
|
)
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
@@ -1,5 +1 @@
|
|||||||

|
# The default keymap for Daisy
|
||||||
|
|
||||||
# Default Daisy Layout
|
|
||||||
|
|
||||||
This is the default layout as offered by KPRepublic's TMK firmware for the Daisy with a few minor tweaks for usability made by me.
|
|
||||||
@@ -1,29 +1,15 @@
|
|||||||
# Daisy
|
# Daisy
|
||||||
|
|
||||||
A 40% keyboard kit sold by KPRepublic.
|

|
||||||
|
|
||||||
Keyboard Maintainer: westfoxtrot (https://github.com/westfoxtrot)
|
A 40% keyboard kit sold by KPrepublic.
|
||||||
Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
|
|
||||||
Hardware Availability: http://tinyurl.com/yc26lq22
|
* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot)
|
||||||
|
* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
|
||||||
|
* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make daisy:default
|
make daisy:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
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).
|
||||||
|
|
||||||
|
|
||||||
# Other Keymaps
|
|
||||||
|
|
||||||
The "default" keymap included is the layout I personally use on the Daisy and the one I have found the most comfortable.
|
|
||||||
|
|
||||||
A printable picture showing this layout is available here: https://imgur.com/9mSF0yf
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make daisy:[default|<name>]
|
|
||||||
```
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
|
|
||||||
I personally had issues with the bootloader on my Daisy PCB and was unable to flash a firmware to the board after the first time. I replaced the bootloader with the one available in the repository at ../../util/bootloader_atmega32u4_1_0_0.hex
|
|
||||||
+16
-14
@@ -11,20 +11,22 @@ MCU = atmega32u4
|
|||||||
# ATmega328P USBasp
|
# ATmega328P USBasp
|
||||||
BOOTLOADER = atmel-dfu
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
# QMK Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change yes to no to disable
|
||||||
# the appropriate keymap folder that will get included automatically
|
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -41,4 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
@@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,4 +39,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 }
|
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
// #define BACKLIGHT_PIN B7
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x445A // "DZ"
|
||||||
#define PRODUCT_ID 0x2260
|
#define PRODUCT_ID 0x2260
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER KBDFans
|
#define MANUFACTURER KBDFans
|
||||||
@@ -46,3 +46,6 @@
|
|||||||
#define RGBLIGHT_SLEEP
|
#define RGBLIGHT_SLEEP
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* VIA related config */
|
||||||
|
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_NO, MO(1), KC_RCTL),
|
||||||
|
LAYOUT(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
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),
|
||||||
|
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)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||||
|
VIA_ENABLE = yes
|
||||||
@@ -132,9 +132,7 @@ void matrix_init_user(void) {
|
|||||||
#ifdef BOOTLOADER_CATERINA
|
#ifdef BOOTLOADER_CATERINA
|
||||||
// This will disable the red LEDs on the ProMicros
|
// This will disable the red LEDs on the ProMicros
|
||||||
setPinInput(D5);
|
setPinInput(D5);
|
||||||
writePinLow(D5);
|
|
||||||
setPinInput(B0);
|
setPinInput(B0);
|
||||||
writePinLow(B0);
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
{ B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 }
|
{ B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
{ B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 }
|
{ B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -23,12 +23,11 @@ void keyboard_pre_init_kb(void) {
|
|||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -25,16 +25,13 @@ void led_init_ports(void) {
|
|||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D0, !led_state.num_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,4 +39,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -25,13 +25,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D0);
|
setPinOutput(D0);
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
writePinHigh(D0);
|
|
||||||
writePinHigh(D1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D0, led_state.num_lock);
|
||||||
|
writePin(D1, led_state.caps_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5 }
|
#define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
#define NO_UART 1
|
#define NO_UART 1
|
||||||
|
|||||||
@@ -24,14 +24,12 @@ void keyboard_pre_init_kb(void) {
|
|||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
setPinOutput(D1);
|
setPinOutput(D1);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
writePinHigh(D1);
|
|
||||||
writePinHigh(D6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool led_update_kb(led_t led_state) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (led_update_user(led_state)) {
|
if (led_update_user(led_state)) {
|
||||||
writePin(D1, !led_state.caps_lock);
|
writePin(D1, led_state.caps_lock);
|
||||||
writePin(D6, !led_state.scroll_lock);
|
writePin(D6, led_state.scroll_lock);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2018 Yiancar
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,10 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Include overwrites for specific keymap */
|
#include "config_common.h"
|
||||||
|
|
||||||
#define HS60_ANSI
|
|
||||||
#undef PRODUCT_ID
|
|
||||||
#define PRODUCT_ID 0x4854
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "getta25.h"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_getta25_rev1
|
||||||
|
#include "rev1.h"
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Getta25",
|
||||||
|
"url": "https://salicylic-acid3.hatenablog.com/",
|
||||||
|
"maintainer": "Salicylic_acid3",
|
||||||
|
"width": 5.25,
|
||||||
|
"height": 6.25,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"ESC", "x":0, "y":0},
|
||||||
|
{"label":"F2", "x":1, "y":0},
|
||||||
|
{"label":"=", "x":2, "y":0},
|
||||||
|
{"label":"DEL", "x":3, "y":0},
|
||||||
|
{"label":"Num Lock", "x":0, "y":1.25},
|
||||||
|
{"label":"/", "x":1, "y":1.25},
|
||||||
|
{"label":"*", "x":2, "y":1.25},
|
||||||
|
{"label":"-", "x":3, "y":1.25},
|
||||||
|
{"label":"7", "x":0, "y":2.25},
|
||||||
|
{"label":"8", "x":1, "y":2.25},
|
||||||
|
{"label":"9", "x":2, "y":2.25},
|
||||||
|
{"label":"ESC", "x":4.25, "y":2.25},
|
||||||
|
{"label":"4", "x":0, "y":3.25},
|
||||||
|
{"label":"5", "x":1, "y":3.25},
|
||||||
|
{"label":"6", "x":2, "y":3.25},
|
||||||
|
{"label":"+", "x":3, "y":2.25, "h":2},
|
||||||
|
{"label":"F2", "x":4.25, "y":3.25},
|
||||||
|
{"label":"1", "x":0, "y":4.25},
|
||||||
|
{"label":"2", "x":1, "y":4.25},
|
||||||
|
{"label":"3", "x":2, "y":4.25},
|
||||||
|
{"label":"DEL", "x":4.25, "y":4.25},
|
||||||
|
{"label":"0", "x":0, "y":5.25, "w":2},
|
||||||
|
{"label":".", "x":2, "y":5.25},
|
||||||
|
{"label":"Enter", "x":3, "y":4.25, "h":2},
|
||||||
|
{"label":"BSPC", "x":4.25, "y":5.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-2
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 westfoxtrot
|
/* Copyright 2018 Salicylic_acid3
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,4 +16,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// place overrides here
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define TAPPING_FORCE_HOLD
|
||||||
|
#define TAPPING_TERM 180
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_number {
|
||||||
|
_BASE,
|
||||||
|
_ARROW,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
//,-----------------------------------|
|
||||||
|
LT(_ADJUST,KC_ESC), KC_F2, KC_EQL, KC_DEL,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_ESC,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS, KC_F2,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_DEL,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
LT(_ARROW, KC_P0), KC_PDOT, KC_PENT, KC_BSPC
|
||||||
|
//`--------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ARROW] = LAYOUT(
|
||||||
|
//,-----------------------------------|
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
XXXXXXX, _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
XXXXXXX, KC_UP, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
XXXXXXX, KC_DOWN, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
MO(_ARROW), _______, _______, _______
|
||||||
|
//`--------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT( /* Base */
|
||||||
|
//,-----------------------------------|
|
||||||
|
MO(_ADJUST), _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
RGB_SAD, RGB_SAI, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
RGB_VAD, RGB_VAI, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
_______, _______, RGB_MOD, _______
|
||||||
|
//`--------------------------------------------'
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/* Copyright 2018 Salicylic_acid3
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define TAPPING_FORCE_HOLD
|
||||||
|
#define TAPPING_TERM 180
|
||||||
|
|
||||||
|
#define OLED_FONT_H "keyboards/getta25/keymaps/oled/glcdfont.c"
|
||||||
|
|
||||||
@@ -0,0 +1,231 @@
|
|||||||
|
// 'loveLain', 128x32px
|
||||||
|
|
||||||
|
#include "progmem.h"
|
||||||
|
|
||||||
|
static const unsigned char font[] PROGMEM = {
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 00
|
||||||
|
0x3E,0x5B,0x4F,0x5B,0x3E,0x00, // 01
|
||||||
|
0x3E,0x6B,0x4F,0x6B,0x3E,0x00, // 02
|
||||||
|
0x1C,0x3E,0x7C,0x3E,0x1C,0x00, // 03
|
||||||
|
0x18,0x3C,0x7E,0x3C,0x18,0x00, // 04
|
||||||
|
0x1C,0x57,0x7D,0x57,0x1C,0x00, // 05
|
||||||
|
0x1C,0x5E,0x7F,0x5E,0x1C,0x00, // 06
|
||||||
|
0x00,0x18,0x3C,0x18,0x00,0x00, // 07
|
||||||
|
0xFF,0xE7,0xC3,0xE7,0xFF,0x00, // 08
|
||||||
|
0x00,0x18,0x24,0x18,0x00,0x00, // 09
|
||||||
|
0xFF,0xE7,0xDB,0xE7,0xFF,0x00, // 0A
|
||||||
|
0x30,0x48,0x3A,0x06,0x0E,0x00, // 0B
|
||||||
|
0x26,0x29,0x79,0x29,0x26,0x00, // 0C
|
||||||
|
0x40,0x7F,0x05,0x05,0x07,0x00, // 0D
|
||||||
|
0x40,0x7F,0x05,0x25,0x3F,0x00, // 0E
|
||||||
|
0x5A,0x3C,0xE7,0x3C,0x5A,0x00, // 0F
|
||||||
|
0x7F,0x3E,0x1C,0x1C,0x08,0x00, // 10
|
||||||
|
0x08,0x1C,0x1C,0x3E,0x7F,0x00, // 11
|
||||||
|
0x14,0x22,0x7F,0x22,0x14,0x00, // 12
|
||||||
|
0x5F,0x5F,0x00,0x5F,0x5F,0x00, // 13
|
||||||
|
0x06,0x09,0x7F,0x01,0x7F,0x00, // 14
|
||||||
|
0x00,0x66,0x89,0x95,0x6A,0x00, // 15
|
||||||
|
0x60,0x60,0x60,0x60,0x60,0x00, // 16
|
||||||
|
0x94,0xA2,0xFF,0xA2,0x94,0x00, // 17
|
||||||
|
0x08,0x04,0x7E,0x04,0x08,0x00, // 18
|
||||||
|
0x10,0x20,0x7E,0x20,0x10,0x00, // 19
|
||||||
|
0x08,0x08,0x2A,0x1C,0x08,0x00, // 1A
|
||||||
|
0x08,0x1C,0x2A,0x08,0x08,0x00, // 1B
|
||||||
|
0x1E,0x10,0x10,0x10,0x10,0x00, // 1C
|
||||||
|
0x0C,0x1E,0x0C,0x1E,0x0C,0x00, // 1D
|
||||||
|
0x30,0x38,0x3E,0x38,0x30,0x00, // 1E
|
||||||
|
0x06,0x0E,0x3E,0x0E,0x06,0x00, // 1F
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 20
|
||||||
|
0x00,0x00,0x5F,0x00,0x00,0x00, // 21 !
|
||||||
|
0x00,0x07,0x00,0x07,0x00,0x00, // 22 "
|
||||||
|
0x14,0x7F,0x14,0x7F,0x14,0x00, // 23 #
|
||||||
|
0x24,0x2A,0x7F,0x2A,0x12,0x00, // 24 $
|
||||||
|
0x23,0x13,0x08,0x64,0x62,0x00, // 25 %
|
||||||
|
0x36,0x49,0x56,0x20,0x50,0x00, // 26 &
|
||||||
|
0x00,0x08,0x07,0x03,0x00,0x00, // 27 '
|
||||||
|
0x00,0x1C,0x22,0x41,0x00,0x00, // 28 (
|
||||||
|
0x00,0x41,0x22,0x1C,0x00,0x00, // 29 )
|
||||||
|
0x2A,0x1C,0x7F,0x1C,0x2A,0x00, // 2A *
|
||||||
|
0x08,0x08,0x3E,0x08,0x08,0x00, // 2B +
|
||||||
|
0x00,0x80,0x70,0x30,0x00,0x00, // 2C ,
|
||||||
|
0x08,0x08,0x08,0x08,0x08,0x00, // 2D -
|
||||||
|
0x00,0x00,0x60,0x60,0x00,0x00, // 2E .
|
||||||
|
0x20,0x10,0x08,0x04,0x02,0x00, // 2F /
|
||||||
|
0x3E,0x51,0x49,0x45,0x3E,0x00, // 30 0
|
||||||
|
0x00,0x42,0x7F,0x40,0x00,0x00, // 31 1
|
||||||
|
0x72,0x49,0x49,0x49,0x46,0x00, // 32 2
|
||||||
|
0x21,0x41,0x49,0x4D,0x33,0x00, // 33 3
|
||||||
|
0x18,0x14,0x12,0x7F,0x10,0x00, // 34 4
|
||||||
|
0x27,0x45,0x45,0x45,0x39,0x00, // 35 5
|
||||||
|
0x3C,0x4A,0x49,0x49,0x31,0x00, // 36 6
|
||||||
|
0x41,0x21,0x11,0x09,0x07,0x00, // 37 7
|
||||||
|
0x36,0x49,0x49,0x49,0x36,0x00, // 38 8
|
||||||
|
0x46,0x49,0x49,0x29,0x1E,0x00, // 39 9
|
||||||
|
0x00,0x00,0x14,0x00,0x00,0x00, // 3A :
|
||||||
|
0x00,0x40,0x34,0x00,0x00,0x00, // 3B ;
|
||||||
|
0x00,0x08,0x14,0x22,0x41,0x00, // 3C <
|
||||||
|
0x14,0x14,0x14,0x14,0x14,0x00, // 3D =
|
||||||
|
0x00,0x41,0x22,0x14,0x08,0x00, // 3E >
|
||||||
|
0x02,0x01,0x59,0x09,0x06,0x00, // 3F ?
|
||||||
|
0x3E,0x41,0x5D,0x59,0x4E,0x00, // 40 @
|
||||||
|
0x7C,0x12,0x11,0x12,0x7C,0x00, // 41 A
|
||||||
|
0x7F,0x49,0x49,0x49,0x36,0x00, // 42 B
|
||||||
|
0x3E,0x41,0x41,0x41,0x22,0x00, // 43 C
|
||||||
|
0x7F,0x41,0x41,0x41,0x3E,0x00, // 44 D
|
||||||
|
0x7F,0x49,0x49,0x49,0x41,0x00, // 45 E
|
||||||
|
0x7F,0x09,0x09,0x09,0x01,0x00, // 46 F
|
||||||
|
0x3E,0x41,0x41,0x51,0x73,0x00, // 47 G
|
||||||
|
0x7F,0x08,0x08,0x08,0x7F,0x00, // 48 H
|
||||||
|
0x00,0x41,0x7F,0x41,0x00,0x00, // 49 I
|
||||||
|
0x20,0x40,0x41,0x3F,0x01,0x00, // 4A J
|
||||||
|
0x7F,0x08,0x14,0x22,0x41,0x00, // 4B K
|
||||||
|
0x7F,0x40,0x40,0x40,0x40,0x00, // 4C L
|
||||||
|
0x7F,0x02,0x1C,0x02,0x7F,0x00, // 4D M
|
||||||
|
0x7F,0x04,0x08,0x10,0x7F,0x00, // 4E N
|
||||||
|
0x3E,0x41,0x41,0x41,0x3E,0x00, // 4F O
|
||||||
|
0x7F,0x09,0x09,0x09,0x06,0x00, // 50 P
|
||||||
|
0x3E,0x41,0x51,0x21,0x5E,0x00, // 51 Q
|
||||||
|
0x7F,0x09,0x19,0x29,0x46,0x00, // 52 R
|
||||||
|
0x26,0x49,0x49,0x49,0x32,0x00, // 53 S
|
||||||
|
0x03,0x01,0x7F,0x01,0x03,0x00, // 54 T
|
||||||
|
0x3F,0x40,0x40,0x40,0x3F,0x00, // 55 U
|
||||||
|
0x1F,0x20,0x40,0x20,0x1F,0x00, // 56 V
|
||||||
|
0x3F,0x40,0x38,0x40,0x3F,0x00, // 57 W
|
||||||
|
0x63,0x14,0x08,0x14,0x63,0x00, // 58 X
|
||||||
|
0x03,0x04,0x78,0x04,0x03,0x00, // 59 Y
|
||||||
|
0x61,0x59,0x49,0x4D,0x43,0x00, // 5A Z
|
||||||
|
0x00,0x7F,0x41,0x41,0x41,0x00, // 5B [
|
||||||
|
0x02,0x04,0x08,0x10,0x20,0x00, // 5C \ .
|
||||||
|
0x00,0x41,0x41,0x41,0x7F,0x00, // 5D ]
|
||||||
|
0x04,0x02,0x01,0x02,0x04,0x00, // 5E ^
|
||||||
|
0x40,0x40,0x40,0x40,0x40,0x00, // 5F _
|
||||||
|
0x00,0x03,0x07,0x08,0x00,0x00, // 60 `
|
||||||
|
0x20,0x54,0x54,0x78,0x40,0x00, // 61 a
|
||||||
|
0x7F,0x28,0x44,0x44,0x38,0x00, // 62 b
|
||||||
|
0x38,0x44,0x44,0x44,0x28,0x00, // 63 c
|
||||||
|
0x38,0x44,0x44,0x28,0x7F,0x00, // 64 d
|
||||||
|
0x38,0x54,0x54,0x54,0x18,0x00, // 65 e
|
||||||
|
0x00,0x08,0x7E,0x09,0x02,0x00, // 66 f
|
||||||
|
0x18,0xA4,0xA4,0x9C,0x78,0x00, // 67 g
|
||||||
|
0x7F,0x08,0x04,0x04,0x78,0x00, // 68 h
|
||||||
|
0x00,0x44,0x7D,0x40,0x00,0x00, // 69 i
|
||||||
|
0x20,0x40,0x40,0x3D,0x00,0x00, // 6A j
|
||||||
|
0x7F,0x10,0x28,0x44,0x00,0x00, // 6B k
|
||||||
|
0x00,0x41,0x7F,0x40,0x00,0x00, // 6C l
|
||||||
|
0x7C,0x04,0x78,0x04,0x78,0x00, // 6D m
|
||||||
|
0x7C,0x08,0x04,0x04,0x78,0x00, // 6E n
|
||||||
|
0x38,0x44,0x44,0x44,0x38,0x00, // 6F o
|
||||||
|
0xFC,0x18,0x24,0x24,0x18,0x00, // 70 p
|
||||||
|
0x18,0x24,0x24,0x18,0xFC,0x00, // 71 q
|
||||||
|
0x7C,0x08,0x04,0x04,0x08,0x00, // 72 r
|
||||||
|
0x48,0x54,0x54,0x54,0x24,0x00, // 73 s
|
||||||
|
0x04,0x04,0x3F,0x44,0x24,0x00, // 74 t
|
||||||
|
0x3C,0x40,0x40,0x20,0x7C,0x00, // 75 u
|
||||||
|
0x1C,0x20,0x40,0x20,0x1C,0x00, // 76 v
|
||||||
|
0x3C,0x40,0x30,0x40,0x3C,0x00, // 77 w
|
||||||
|
0x44,0x28,0x10,0x28,0x44,0x00, // 78 x
|
||||||
|
0x4C,0x90,0x90,0x90,0x7C,0x00, // 79 y
|
||||||
|
0x44,0x64,0x54,0x4C,0x44,0x00, // 7A z
|
||||||
|
0x00,0x08,0x36,0x41,0x00,0x00, // 7B {
|
||||||
|
0x00,0x00,0x77,0x00,0x00,0x00, // 7C |
|
||||||
|
0x00,0x41,0x36,0x08,0x00,0x00, // 7D }
|
||||||
|
0x02,0x01,0x02,0x04,0x02,0x00, // 7E ~
|
||||||
|
0x3C,0x26,0x23,0x26,0x3C,0x00, // 7F
|
||||||
|
0xC7,0xC7,0xC7,0x00,0x00,0x00, // 80
|
||||||
|
0x00,0x20,0x60,0x60,0x60,0x60, // 81
|
||||||
|
0x60,0xE0,0x20,0x20,0x20,0x20, // 82
|
||||||
|
0x20,0x60,0x60,0x00,0x00,0x00, // 83
|
||||||
|
0x00,0x00,0x00,0xC7,0xC7,0xC7, // 84
|
||||||
|
0xC7,0xC7,0xC7,0x00,0x00,0x00, // 85
|
||||||
|
0x00,0xE0,0x70,0x50,0xFE,0x7A, // 86
|
||||||
|
0x02,0x00,0x20,0x60,0xE0,0xF3, // 87
|
||||||
|
0x3E,0x30,0x10,0x10,0x00,0x00, // 88
|
||||||
|
0x00,0x00,0x00,0xC7,0xC7,0xC7, // 89
|
||||||
|
0xC7,0xC7,0xC7,0x00,0x00,0x80, // 8A
|
||||||
|
0xC0,0xC3,0xA1,0x90,0x98,0x84, // 8B
|
||||||
|
0x83,0x00,0x00,0x1E,0x09,0x0C, // 8C
|
||||||
|
0x04,0xC4,0x7C,0x18,0x00,0x00, // 8D
|
||||||
|
0x00,0x00,0x00,0xC7,0xC7,0xC7, // 8E
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 8F
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 90
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 91
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 92
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 93
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0xE0, // 94
|
||||||
|
0xF0,0xF0,0xF0,0xE0,0xEC,0xEE, // 95
|
||||||
|
0xF7,0xF3,0x70,0x20,0x00,0x7C, // 96
|
||||||
|
0x7C,0x7C,0x7E,0x00,0x7E,0x7E, // 97
|
||||||
|
0x7E,0x7F,0x7F,0x7F,0x00,0x00, // 98
|
||||||
|
0x80,0xC0,0xE0,0x7E,0x5B,0x4F, // 99
|
||||||
|
0x5B,0xFE,0xC0,0x00,0x00,0xC0, // 9A
|
||||||
|
0x00,0xDC,0xD7,0xDE,0xDE,0xDE, // 9B
|
||||||
|
0xD7,0xDC,0x00,0xC0,0x00,0x00, // 9C
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 9D
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // 9E
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0xFF, // 9F
|
||||||
|
0x71,0x71,0x71,0x00,0x00,0x00, // A0
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // A1 ?
|
||||||
|
0xC0,0xFF,0x00,0x08,0x0E,0x0E, // A2 ?
|
||||||
|
0x0C,0x00,0x00,0x00,0x00,0x00, // A3 ?
|
||||||
|
0x00,0x00,0x00,0x71,0x71,0x71, // A4 ?
|
||||||
|
0x71,0x71,0x71,0x00,0x00,0x08, // A5 ?
|
||||||
|
0x08,0x09,0x18,0x25,0x61,0x31, // A6 ?
|
||||||
|
0x1F,0x06,0x04,0x06,0x13,0x32, // A7 §
|
||||||
|
0x32,0x62,0x02,0x06,0x0C,0x08, // A8 ¨
|
||||||
|
0x00,0x00,0x00,0x71,0x71,0x71, // A9 ?
|
||||||
|
0x71,0x71,0x71,0x00,0x00,0x00, // AA ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // AB ?
|
||||||
|
0x09,0x11,0x18,0x08,0x0C,0x06, // AC ?
|
||||||
|
0x03,0x00,0x00,0x00,0x00,0x00, // AD ?
|
||||||
|
0x00,0x00,0x00,0x71,0x71,0x71, // AE ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // AF ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // B0 °
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // B1 ±
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // B2 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // B3 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x0F, // B4 ´
|
||||||
|
0x1F,0x3F,0x7F,0x7F,0x7F,0x7F, // B5 ?
|
||||||
|
0x7F,0x3F,0x1E,0x0C,0x00,0x1F, // B6 ¶
|
||||||
|
0x1F,0x1F,0x3F,0x00,0x3F,0x3F, // B7 ?
|
||||||
|
0x3F,0x7F,0x7F,0x7F,0x00,0x30, // B8 ?
|
||||||
|
0x7B,0x7F,0x78,0x30,0x20,0x20, // B9 ?
|
||||||
|
0x30,0x78,0x7F,0x3B,0x00,0x03, // BA ?
|
||||||
|
0x00,0x0F,0x7F,0x0F,0x0F,0x0F, // BB ?
|
||||||
|
0x7F,0x0F,0x00,0x03,0x00,0x00, // BC ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // BD ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // BE ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0xFF, // BF ?
|
||||||
|
0x1C,0x1C,0x1C,0x00,0x00,0x00, // C0 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // C1 ?
|
||||||
|
0x07,0x0F,0x00,0x00,0x00,0x00, // C2 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // C3 ?
|
||||||
|
0x00,0x00,0x00,0x1C,0x1C,0x1C, // C4 ?
|
||||||
|
0x1C,0x1C,0x1C,0x00,0x00,0x00, // C5 ?
|
||||||
|
0x00,0x00,0x80,0x80,0xC0,0x40, // C6 ?
|
||||||
|
0x80,0x00,0x00,0x00,0xC0,0x40, // C7 ?
|
||||||
|
0x40,0xC0,0xC0,0xC0,0x00,0x00, // C8 ?
|
||||||
|
0x00,0x00,0x00,0x1C,0x1C,0x1C, // C9 ?
|
||||||
|
0x1C,0x1C,0x1C,0x00,0x00,0x00, // CA ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // CB ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // CC ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // CD ?
|
||||||
|
0x00,0x00,0x00,0x1C,0x1C,0x1C, // CE ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // CF ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D0 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D1 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D2 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D3 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D4 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D5 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D6 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D7 ×
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D8 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // D9 ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // DA ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // DB ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // DC ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // DD ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00, // DE ?
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0xFF, // DF ?
|
||||||
|
};
|
||||||
|
static const unsigned int fontLen = 512;
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_jp.h"
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
static uint32_t oled_timer = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_number {
|
||||||
|
_BASE,
|
||||||
|
_ARROW,
|
||||||
|
_MACRO,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
RGB_RST = SAFE_RANGE,
|
||||||
|
SEND_SUM,
|
||||||
|
SEND_AVE,
|
||||||
|
SEND_CIF,
|
||||||
|
SEND_MAX,
|
||||||
|
SEND_MIN
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
//,-----------------------------------|
|
||||||
|
KC_ESC, KC_F2, JP_EQL, KC_DEL,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_P7, KC_P8, KC_P9, LCTL(JP_LBRC),
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS, JP_EQL,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_DEL,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC
|
||||||
|
//`--------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ARROW] = LAYOUT(
|
||||||
|
//,-----------------------------------|
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
XXXXXXX, _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
XXXXXXX, KC_UP, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
XXXXXXX, KC_DOWN, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
MO(_ARROW), MO(_MACRO), _______, _______
|
||||||
|
//`--------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MACRO] = LAYOUT(
|
||||||
|
//,-----------------------------------|
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
SEND_MIN,SEND_MAX,SEND_CIF,SEND_AVE,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_F7, KC_F8, KC_F9, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_F4, KC_F5, KC_F6,SEND_SUM, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
KC_F11, KC_F12, KC_F3, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
_______, _______, JP_RPRN, _______
|
||||||
|
//`--------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT( /* Base */
|
||||||
|
//,-----------------------------------|
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
//|--------+--------+--------+--------|
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
RGB_SAD, RGB_SAI, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
RGB_VAD, RGB_VAI, XXXXXXX, _______,
|
||||||
|
//|--------+--------+--------+--------+--------|
|
||||||
|
_______, _______, RGB_MOD, _______
|
||||||
|
//`--------------------------------------------'
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
//A description for expressing the layer position in LED mode.
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
state = update_tri_layer_state(state, _ARROW, _MACRO, _ADJUST);
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
switch (get_highest_layer(state)) {
|
||||||
|
case _ARROW:
|
||||||
|
rgblight_sethsv_at(HSV_BLUE, 0);
|
||||||
|
break;
|
||||||
|
case _MACRO:
|
||||||
|
rgblight_sethsv_at(HSV_RED, 0);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
rgblight_sethsv_at(HSV_PURPLE, 0);
|
||||||
|
break;
|
||||||
|
default: // for any other layers, or the default layer
|
||||||
|
rgblight_sethsv_range( 0, 0, 0, 0, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
rgblight_set_effect_range( 1, 8);
|
||||||
|
#endif
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
int RGB_current_mode;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
bool result = false;
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
oled_timer = timer_read32();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
switch (keycode) {
|
||||||
|
case SEND_SUM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("_SUM*");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SEND_AVE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("_AVERAGE*");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SEND_CIF:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("_COUNTIF*");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SEND_MAX:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("_MAX*");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SEND_MIN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("_MIN*");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||||
|
|
||||||
|
void render_layer_state(void) {
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
oled_write_P(PSTR("LAYER"), false);
|
||||||
|
oled_write_P(PSTR("Arrow"), layer_state_is(_ARROW));
|
||||||
|
oled_write_P(PSTR("Macro"), layer_state_is(_MACRO));
|
||||||
|
oled_write_P(PSTR("Adjus"), layer_state_is(_ADJUST));
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_keylock_status(led_t led_state) {
|
||||||
|
oled_write_P(PSTR("NumL "), led_state.num_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_layer_messages(void) {
|
||||||
|
oled_write_P(PSTR("GETtA 25 For Your Good Job. "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_status(void) {
|
||||||
|
/* Show Keyboard Layout */
|
||||||
|
render_layer_state();
|
||||||
|
render_keylock_status(host_keyboard_led_state());
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
static const char PROGMEM font_logo[] = {
|
||||||
|
0x80,0x81,0x82,0x83,0x84,
|
||||||
|
0xa0,0xa1,0xa2,0xa3,0xa4,
|
||||||
|
0xc0,0xc1,0xc2,0xc3,0xc4,
|
||||||
|
|
||||||
|
0x85,0x86,0x87,0x88,0x89,
|
||||||
|
0xa5,0xa6,0xa7,0xa8,0xa9,
|
||||||
|
0xc5,0xc6,0xc7,0xc8,0xc9,
|
||||||
|
|
||||||
|
0x8a,0x8b,0x8c,0x8d,0x8e,
|
||||||
|
0xaa,0xab,0xac,0xad,0xae,
|
||||||
|
0xca,0xcb,0xcc,0xcd,0xce,0
|
||||||
|
};
|
||||||
|
oled_write_P(font_logo, false);
|
||||||
|
|
||||||
|
render_status(); // Renders the current keyboard state (layer, lock)
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# getta25
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is 25 keys tenkeypad.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3)
|
||||||
|
* Hardware Supported: Getta25 PCB, Pro Micro
|
||||||
|
* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1700006)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make getta25:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
[Build guide](https://salicylic-acid3.hatenablog.com/entry/getta25-rev2-build-guide)
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x3060
|
||||||
|
#define DEVICE_VER 0x0013
|
||||||
|
#define MANUFACTURER Salicylic_Acid
|
||||||
|
#define PRODUCT getta25
|
||||||
|
#define DESCRIPTION A custom keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B2 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
|
||||||
|
#define RGBLED_NUM 9 // Number of LEDs
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
|
#ifndef IOS_DEVICE_ENABLE
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 180
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
#else
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 50
|
||||||
|
#define RGBLIGHT_VAL_STEP 4
|
||||||
|
#endif
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
|
||||||
|
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
||||||
|
// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard
|
||||||
|
// 120 RGBoff, OLEDoff
|
||||||
|
// 120 OLED
|
||||||
|
// 330 RGB 6
|
||||||
|
// 300 RGB 32
|
||||||
|
// 310 OLED & RGB 32
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 400
|
||||||
|
#else
|
||||||
|
// fix iPhone and iPad power adapter issue
|
||||||
|
// iOS device need lessthan 100
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
#endif
|
||||||
Loaded 100 of 368 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user