Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54b04d9665 | ||
|
|
4604c70c4c | ||
|
|
010c5b12bd | ||
|
|
4adf4d5a89 | ||
|
|
d0e0202b27 | ||
|
|
fb9425df82 | ||
|
|
22ad35b225 | ||
|
|
f6cec668c7 | ||
|
|
2651edc243 | ||
|
|
2a43989d30 | ||
|
|
2f5521cd48 | ||
|
|
ac3d2a3810 | ||
|
|
1786490993 | ||
|
|
e55d55edc0 | ||
|
|
ad014c2539 | ||
|
|
81698df056 | ||
|
|
fca35a3540 | ||
|
|
5d01cc45be | ||
|
|
eaab0844e8 | ||
|
|
65c8ac9ac9 | ||
|
|
3d760caa85 | ||
|
|
3de4c3ea6a | ||
|
|
a84d239661 | ||
|
|
41fd60d624 | ||
|
|
168ba88ada |
No files matched your search
+6
-1
@@ -70,7 +70,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
|
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
|
||||||
EEPROM_DRIVER ?= vendor
|
EEPROM_DRIVER ?= vendor
|
||||||
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
|
||||||
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
|
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
|
||||||
@@ -85,6 +85,11 @@ else
|
|||||||
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
SRC += eeprom_driver.c eeprom_i2c.c
|
SRC += eeprom_driver.c eeprom_i2c.c
|
||||||
|
else ifeq ($(strip $(EEPROM_DRIVER)), spi)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
QUANTUM_LIB_SRC += spi_master.c
|
||||||
|
SRC += eeprom_driver.c eeprom_spi.c
|
||||||
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
|
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
|
||||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
|
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
|||||||
+24
-5
@@ -1,4 +1,4 @@
|
|||||||
# EEPROM Driver Configuration
|
# EEPROM Driver Configuration :id=eeprom-driver-configuration
|
||||||
|
|
||||||
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
||||||
|
|
||||||
@@ -6,15 +6,20 @@ Driver | Description
|
|||||||
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
`EEPROM_DRIVER = vendor` (default) | 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. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
|
`EEPROM_DRIVER = vendor` (default) | 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. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. 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 = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
||||||
|
`EEPROM_DRIVER = spi` | Supports writing to SPI-based 25xx 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.
|
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
||||||
|
|
||||||
## Vendor Driver Configuration
|
## Vendor Driver Configuration :id=vendor-eeprom-driver-configuration
|
||||||
|
|
||||||
|
#### STM32 L0/L1 Configuration :id=stm32l0l1-eeprom-driver-configuration
|
||||||
|
|
||||||
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
|
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
|
||||||
|
|
||||||
No configurable options are available.
|
`config.h` override | Description | Default Value
|
||||||
|
------------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------
|
||||||
|
`#define STM32_ONBOARD_EEPROM_SIZE` | The size of the EEPROM to use, in bytes. Erase times can be high, so it's configurable here, if not using the default value. | Minimum required to cover base _eeconfig_ data, or `1024` if VIA is enabled.
|
||||||
|
|
||||||
## I2C Driver Configuration
|
## I2C Driver Configuration :id=i2c-eeprom-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:
|
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:
|
||||||
|
|
||||||
@@ -41,7 +46,21 @@ MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/p
|
|||||||
|
|
||||||
?> 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`.
|
?> 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
|
## SPI Driver Configuration :id=spi-eeprom-driver-configuration
|
||||||
|
|
||||||
|
Currently QMK supports 25xx-series chips over SPI. As such, requires a working spi_master driver configuration. You can override the driver configuration via your config.h:
|
||||||
|
|
||||||
|
`config.h` override | Description | Default Value
|
||||||
|
-----------------------------------------------|--------------------------------------------------------------------------------------|--------------
|
||||||
|
`#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN` | SPI Slave select pin in order to inform that the EEPROM is currently being addressed | _none_
|
||||||
|
`#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR` | Clock divisor used to divide the peripheral clock to derive the SPI frequency | `64`
|
||||||
|
`#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
|
||||||
|
|
||||||
|
!> There's no way to determine if there is an SPI EEPROM actually responding. Generally, this will result in reads of nothing but zero.
|
||||||
|
|
||||||
|
## Transient Driver configuration :id=transient-eeprom-driver-configuration
|
||||||
|
|
||||||
The only configurable item for the transient EEPROM driver is its size:
|
The only configurable item for the transient EEPROM driver is its size:
|
||||||
|
|
||||||
|
|||||||
@@ -437,12 +437,16 @@ Where `28` is an unused index from `eeconfig.h`.
|
|||||||
|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|
|
||||||
### Query Current Status :id=query-current-status
|
### Query Current Status :id=query-current-status
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|-----------------------|-----------------|
|
|---------------------------------|---------------------------|
|
||||||
|`rgb_matrix_get_mode()` |Get current mode |
|
|`rgb_matrix_is_enabled()` |Gets current on/off status |
|
||||||
|`rgb_matrix_get_hue()` |Get current hue |
|
|`rgb_matrix_get_mode()` |Gets current mode |
|
||||||
|`rgb_matrix_get_sat()` |Get current sat |
|
|`rgb_matrix_get_hue()` |Gets current hue |
|
||||||
|`rgb_matrix_get_val()` |Get current val |
|
|`rgb_matrix_get_sat()` |Gets current sat |
|
||||||
|
|`rgb_matrix_get_val()` |Gets current val |
|
||||||
|
|`rgb_matrix_get_hsv()` |Gets hue, sat, and val and returns a [`HSV` structure](https://github.com/qmk/qmk_firmware/blob/7ba6456c0b2e041bb9f97dbed265c5b8b4b12192/quantum/color.h#L56-L61)|
|
||||||
|
|`rgb_matrix_get_speed()` |Gets current speed |
|
||||||
|
|`rgb_matrix_get_suspend_state()` |Gets current suspend state |
|
||||||
|
|
||||||
## Callbacks :id=callbacks
|
## Callbacks :id=callbacks
|
||||||
|
|
||||||
|
|||||||
@@ -376,12 +376,14 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2
|
|||||||
|`rgblight_set_layer_state(i, is_on)` |Enable or disable lighting layer `i` based on value of `bool is_on` |
|
|`rgblight_set_layer_state(i, is_on)` |Enable or disable lighting layer `i` based on value of `bool is_on` |
|
||||||
|
|
||||||
#### query
|
#### query
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|-----------------------|-----------------|
|
|-----------------------|---------------------------|
|
||||||
|`rgblight_get_mode()` |Get current mode |
|
|`rgblight_is_enabled()`|Gets current on/off status |
|
||||||
|`rgblight_get_hue()` |Get current hue |
|
|`rgblight_get_mode()` |Gets current mode |
|
||||||
|`rgblight_get_sat()` |Get current sat |
|
|`rgblight_get_hue()` |Gets current hue |
|
||||||
|`rgblight_get_val()` |Get current val |
|
|`rgblight_get_sat()` |Gets current sat |
|
||||||
|
|`rgblight_get_val()` |Gets current val |
|
||||||
|
|`rgblight_get_speed()` |Gets current speed |
|
||||||
|
|
||||||
## Colors
|
## Colors
|
||||||
|
|
||||||
|
|||||||
@@ -20,19 +20,19 @@
|
|||||||
#include "eeprom_driver.h"
|
#include "eeprom_driver.h"
|
||||||
|
|
||||||
uint8_t eeprom_read_byte(const uint8_t *addr) {
|
uint8_t eeprom_read_byte(const uint8_t *addr) {
|
||||||
uint8_t ret;
|
uint8_t ret = 0;
|
||||||
eeprom_read_block(&ret, addr, 1);
|
eeprom_read_block(&ret, addr, 1);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t eeprom_read_word(const uint16_t *addr) {
|
uint16_t eeprom_read_word(const uint16_t *addr) {
|
||||||
uint16_t ret;
|
uint16_t ret = 0;
|
||||||
eeprom_read_block(&ret, addr, 2);
|
eeprom_read_block(&ret, addr, 2);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t eeprom_read_dword(const uint32_t *addr) {
|
uint32_t eeprom_read_dword(const uint32_t *addr) {
|
||||||
uint32_t ret;
|
uint32_t ret = 0;
|
||||||
eeprom_read_block(&ret, addr, 4);
|
eeprom_read_block(&ret, addr, 4);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-11
@@ -50,7 +50,7 @@ static inline void init_i2c_if_required(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||||
intptr_t p = (intptr_t)addr;
|
uintptr_t p = (uintptr_t)addr;
|
||||||
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
||||||
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF;
|
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF;
|
||||||
p >>= 8;
|
p >>= 8;
|
||||||
@@ -60,11 +60,19 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
|||||||
void eeprom_driver_init(void) {}
|
void eeprom_driver_init(void) {}
|
||||||
|
|
||||||
void eeprom_driver_erase(void) {
|
void eeprom_driver_erase(void) {
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uint32_t start = timer_read32();
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
|
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
|
||||||
memset(buf, 0x00, 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) {
|
for (uint32_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
|
||||||
eeprom_write_block(buf, (void *)addr, EXTERNAL_EEPROM_PAGE_SIZE);
|
eeprom_write_block(buf, (void *)(uintptr_t)addr, EXTERNAL_EEPROM_PAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
dprintf("EEPROM erase took %ldms to complete\n", ((long)(timer_read32() - start)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
@@ -72,8 +80,8 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
|||||||
fill_target_address(complete_packet, addr);
|
fill_target_address(complete_packet, addr);
|
||||||
|
|
||||||
init_i2c_if_required();
|
init_i2c_if_required();
|
||||||
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
|
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
|
||||||
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), buf, len, 100);
|
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), buf, len, 100);
|
||||||
|
|
||||||
#ifdef DEBUG_EEPROM_OUTPUT
|
#ifdef DEBUG_EEPROM_OUTPUT
|
||||||
dprintf("[EEPROM R] 0x%04X: ", ((int)addr));
|
dprintf("[EEPROM R] 0x%04X: ", ((int)addr));
|
||||||
@@ -85,14 +93,14 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
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 complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE];
|
||||||
uint8_t *read_buf = (uint8_t *)buf;
|
uint8_t * read_buf = (uint8_t *)buf;
|
||||||
intptr_t target_addr = (intptr_t)addr;
|
uintptr_t target_addr = (uintptr_t)addr;
|
||||||
|
|
||||||
init_i2c_if_required();
|
init_i2c_if_required();
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
intptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
||||||
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
||||||
if (write_length > len) {
|
if (write_length > len) {
|
||||||
write_length = len;
|
write_length = len;
|
||||||
}
|
}
|
||||||
@@ -110,7 +118,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
|||||||
dprintf("\n");
|
dprintf("\n");
|
||||||
#endif // DEBUG_EEPROM_OUTPUT
|
#endif // DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
|
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
|
||||||
wait_ms(EXTERNAL_EEPROM_WRITE_TIME);
|
wait_ms(EXTERNAL_EEPROM_WRITE_TIME);
|
||||||
|
|
||||||
read_buf += write_length;
|
read_buf += write_length;
|
||||||
|
|||||||
@@ -0,0 +1,231 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 SPI 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 "spi_master.h"
|
||||||
|
#include "eeprom.h"
|
||||||
|
#include "eeprom_spi.h"
|
||||||
|
|
||||||
|
#define CMD_WREN 6
|
||||||
|
#define CMD_WRDI 4
|
||||||
|
#define CMD_RDSR 5
|
||||||
|
#define CMD_WRSR 1
|
||||||
|
#define CMD_READ 3
|
||||||
|
#define CMD_WRITE 2
|
||||||
|
|
||||||
|
#define SR_WIP 0x01
|
||||||
|
|
||||||
|
// #define DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
|
#ifndef EXTERNAL_EEPROM_SPI_TIMEOUT
|
||||||
|
# define EXTERNAL_EEPROM_SPI_TIMEOUT 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
# include "print.h"
|
||||||
|
#endif // CONSOLE_ENABLE
|
||||||
|
|
||||||
|
static void init_spi_if_required(void) {
|
||||||
|
static int done = 0;
|
||||||
|
if (!done) {
|
||||||
|
spi_init();
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool spi_eeprom_start(void) { return spi_start(EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN, EXTERNAL_EEPROM_SPI_LSBFIRST, EXTERNAL_EEPROM_SPI_MODE, EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR); }
|
||||||
|
|
||||||
|
static spi_status_t spi_eeprom_wait_while_busy(int timeout) {
|
||||||
|
uint32_t deadline = timer_read32() + timeout;
|
||||||
|
spi_status_t response;
|
||||||
|
do {
|
||||||
|
spi_write(CMD_RDSR);
|
||||||
|
response = spi_read();
|
||||||
|
if (timer_read32() >= deadline) {
|
||||||
|
return SPI_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
} while (response & SR_WIP);
|
||||||
|
return SPI_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void spi_eeprom_transmit_address(uintptr_t addr) {
|
||||||
|
uint8_t buffer[EXTERNAL_EEPROM_ADDRESS_SIZE];
|
||||||
|
|
||||||
|
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
||||||
|
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = addr & 0xFF;
|
||||||
|
addr >>= 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_transmit(buffer, EXTERNAL_EEPROM_ADDRESS_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void eeprom_driver_init(void) {}
|
||||||
|
|
||||||
|
void eeprom_driver_erase(void) {
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
uint32_t start = timer_read32();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
|
||||||
|
memset(buf, 0x00, EXTERNAL_EEPROM_PAGE_SIZE);
|
||||||
|
for (uint32_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
|
||||||
|
eeprom_write_block(buf, (void *)(uintptr_t)addr, EXTERNAL_EEPROM_PAGE_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONSOLE_ENABLE
|
||||||
|
dprintf("EEPROM erase took %ldms to complete\n", ((long)(timer_read32() - start)));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
|
init_spi_if_required();
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Wait for the write-in-progress bit to be cleared
|
||||||
|
bool res = spi_eeprom_start();
|
||||||
|
if (!res) {
|
||||||
|
dprint("failed to start SPI for WIP check\n");
|
||||||
|
memset(buf, 0, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_status_t response = spi_eeprom_wait_while_busy(EXTERNAL_EEPROM_SPI_TIMEOUT);
|
||||||
|
spi_stop();
|
||||||
|
if (response == SPI_STATUS_TIMEOUT) {
|
||||||
|
dprint("SPI timeout for WIP check\n");
|
||||||
|
memset(buf, 0, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Perform read
|
||||||
|
res = spi_eeprom_start();
|
||||||
|
if (!res) {
|
||||||
|
dprint("failed to start SPI for read\n");
|
||||||
|
memset(buf, 0, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_write(CMD_READ);
|
||||||
|
spi_eeprom_transmit_address((uintptr_t)addr);
|
||||||
|
spi_receive(buf, len);
|
||||||
|
|
||||||
|
#ifdef DEBUG_EEPROM_OUTPUT
|
||||||
|
dprintf("[EEPROM R] 0x%08lX: ", ((uint32_t)(uintptr_t)addr));
|
||||||
|
for (size_t i = 0; i < len; ++i) {
|
||||||
|
dprintf(" %02X", (int)(((uint8_t *)buf)[i]));
|
||||||
|
}
|
||||||
|
dprintf("\n");
|
||||||
|
#endif // DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
|
spi_stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
|
init_spi_if_required();
|
||||||
|
|
||||||
|
bool res;
|
||||||
|
uint8_t * read_buf = (uint8_t *)buf;
|
||||||
|
uintptr_t target_addr = (uintptr_t)addr;
|
||||||
|
|
||||||
|
while (len > 0) {
|
||||||
|
uintptr_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;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Wait for the write-in-progress bit to be cleared
|
||||||
|
res = spi_eeprom_start();
|
||||||
|
if (!res) {
|
||||||
|
dprint("failed to start SPI for WIP check\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_status_t response = spi_eeprom_wait_while_busy(EXTERNAL_EEPROM_SPI_TIMEOUT);
|
||||||
|
spi_stop();
|
||||||
|
if (response == SPI_STATUS_TIMEOUT) {
|
||||||
|
dprint("SPI timeout for WIP check\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Enable writes
|
||||||
|
res = spi_eeprom_start();
|
||||||
|
if (!res) {
|
||||||
|
dprint("failed to start SPI for write-enable\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_write(CMD_WREN);
|
||||||
|
spi_stop();
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Perform the write
|
||||||
|
res = spi_eeprom_start();
|
||||||
|
if (!res) {
|
||||||
|
dprint("failed to start SPI for write\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_EEPROM_OUTPUT
|
||||||
|
dprintf("[EEPROM W] 0x%08lX: ", ((uint32_t)(uintptr_t)target_addr));
|
||||||
|
for (size_t i = 0; i < write_length; i++) {
|
||||||
|
dprintf(" %02X", (int)(uint8_t)(read_buf[i]));
|
||||||
|
}
|
||||||
|
dprintf("\n");
|
||||||
|
#endif // DEBUG_EEPROM_OUTPUT
|
||||||
|
|
||||||
|
spi_write(CMD_WRITE);
|
||||||
|
spi_eeprom_transmit_address(target_addr);
|
||||||
|
spi_transmit(read_buf, write_length);
|
||||||
|
spi_stop();
|
||||||
|
|
||||||
|
read_buf += write_length;
|
||||||
|
target_addr += write_length;
|
||||||
|
len -= write_length;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// Disable writes
|
||||||
|
res = spi_eeprom_start();
|
||||||
|
if (!res) {
|
||||||
|
dprint("failed to start SPI for write-disable\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_write(CMD_WRDI);
|
||||||
|
spi_stop();
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 slave select pin of the EEPROM.
|
||||||
|
This needs to be a normal GPIO pin_t value, such as A7.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN
|
||||||
|
# error "No chip select pin defined -- missing EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The clock divisor for SPI to ensure that the MCU is within the
|
||||||
|
specifications of the EEPROM chip. Generally this will be PCLK divided by
|
||||||
|
the intended divisor -- check your clock settings and the datasheet of
|
||||||
|
your EEPROM.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR
|
||||||
|
# ifdef __AVR__
|
||||||
|
# define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 8
|
||||||
|
# else
|
||||||
|
# define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
The SPI mode to communicate with the EEPROM.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_SPI_MODE
|
||||||
|
# define EXTERNAL_EEPROM_SPI_MODE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
Whether or not the SPI communication between the MCU and EEPROM should be
|
||||||
|
LSB-first.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_SPI_LSBFIRST
|
||||||
|
# define EXTERNAL_EEPROM_SPI_LSBFIRST false
|
||||||
|
#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 4.
|
||||||
|
|
||||||
|
As expected, consult the datasheet for specifics of your EEPROM.
|
||||||
|
*/
|
||||||
|
#ifndef EXTERNAL_EEPROM_ADDRESS_SIZE
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "arabica37.h"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_arabica37_rev1
|
||||||
|
#include "rev1.h"
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "arabica37 rev. 1",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15.25,
|
||||||
|
"height": 5.75,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0.25, "y":0.75},
|
||||||
|
{"label":"Q", "x":1.25, "y":0.75},
|
||||||
|
{"label":"W", "x":2.25, "y":0.25},
|
||||||
|
{"label":"E", "x":3.25, "y":0},
|
||||||
|
{"label":"R", "x":4.25, "y":0.25},
|
||||||
|
{"label":"T", "x":5.25, "y":0.5},
|
||||||
|
|
||||||
|
{"label":"Y", "x":9, "y":0.5},
|
||||||
|
{"label":"U", "x":10, "y":0.25},
|
||||||
|
{"label":"I", "x":11, "y":0},
|
||||||
|
{"label":"O", "x":12, "y":0.25},
|
||||||
|
{"label":"P", "x":13, "y":0.75},
|
||||||
|
{"label":"Backspace", "x":14, "y":0.75},
|
||||||
|
|
||||||
|
{"label":"Ctrl", "x":0.25, "y":1.75},
|
||||||
|
{"label":"A", "x":1.25, "y":1.75},
|
||||||
|
{"label":"S", "x":2.25, "y":1.25},
|
||||||
|
{"label":"D", "x":3.25, "y":1},
|
||||||
|
{"label":"F", "x":4.25, "y":1.25},
|
||||||
|
{"label":"G", "x":5.25, "y":1.5},
|
||||||
|
|
||||||
|
{"label":"H", "x":9, "y":1.5},
|
||||||
|
{"label":"J", "x":10, "y":1.25},
|
||||||
|
{"label":"K", "x":11, "y":1},
|
||||||
|
{"label":"L", "x":12, "y":1.25},
|
||||||
|
{"label":";", "x":13, "y":1.75},
|
||||||
|
{"label":"'", "x":14, "y":1.75},
|
||||||
|
|
||||||
|
{"label":"Adjust", "x":0.25, "y":2.75},
|
||||||
|
{"label":"Z", "x":1.25, "y":2.75},
|
||||||
|
{"label":"X", "x":2.25, "y":2.25},
|
||||||
|
{"label":"C", "x":3.25, "y":2},
|
||||||
|
{"label":"V", "x":4.25, "y":2.25},
|
||||||
|
{"label":"B", "x":5.25, "y":2.5},
|
||||||
|
|
||||||
|
{"label":"N", "x":9, "y":2.5},
|
||||||
|
{"label":"M", "x":10, "y":2.25},
|
||||||
|
{"label":",", "x":11, "y":2},
|
||||||
|
{"label":".", "x":12, "y":2.25},
|
||||||
|
{"label":"/", "x":13, "y":2.75},
|
||||||
|
{"label":"\\", "x":14, "y":2.75},
|
||||||
|
|
||||||
|
{"label":"Shift", "x":0, "y":3.75, "w":2.25},
|
||||||
|
{"label":"Lower", "x":4.375, "y":3.75, "w":1.5},
|
||||||
|
{"label":"GUI", "x":5.875, "y":3.75, "w":1.25},
|
||||||
|
|
||||||
|
{"label":"Alt", "x":8.125, "y":3.75, "w":1.25},
|
||||||
|
{"label":"Raise", "x":9.375, "y":3.75, "w":1.5},
|
||||||
|
{"label":"Shift", "x":13, "y":3.75, "w":2.25},
|
||||||
|
|
||||||
|
{"label":"Space", "x":5.125, "y":4.75, "w":1.25},
|
||||||
|
{"label":"Enter", "x":8.875, "y":4.75, "w":1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
//#define USE_MATRIX_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#define TAPPING_FORCE_HOLD
|
||||||
|
#define TAPPING_TERM 170
|
||||||
|
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 27
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 120
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
#define OLED_FONT_H "keyboards/arabica37/lib/glcdfont.c"
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
LOWER = SAFE_RANGE,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
RGBRST
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
//,-----------------------------------------------. ,-----------------------------------------------.
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
ADJUST, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,KC_BSLS,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_LSFT, LOWER,KC_LGUI, KC_LALT, RAISE, KC_RSFT,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_SPC, KC_ENT
|
||||||
|
//`-----------------------------------------------' `-----------------------------------------------'
|
||||||
|
),
|
||||||
|
[_LOWER] = LAYOUT( \
|
||||||
|
//,-----------------------------------------------. ,-----------------------------------------------.
|
||||||
|
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_TRNS,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS,KC_HOME,KC_LEFT, KC_UP,KC_RGHT,KC_PGUP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS, KC_END,KC_PSCR,KC_DOWN, KC_INS,KC_PGDN, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS, KC_TRNS
|
||||||
|
//`-----------------------------------------------' `-----------------------------------------------'
|
||||||
|
),
|
||||||
|
[_RAISE] = LAYOUT( \
|
||||||
|
//,-----------------------------------------------. ,-----------------------------------------------.
|
||||||
|
KC_TRNS,KC_EXLM, KC_AT,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_PSLS,KC_PAST,KC_PMNS,KC_PPLS,KC_TRNS,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS,KC_RBRC,KC_LABK,KC_ASTR,KC_SCLN,KC_LBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS,KC_BSLS,KC_RABK,KC_LPRN,KC_JYEN,KC_UNDS, KC_6, KC_7, KC_8, KC_9, KC_0,KC_PENT,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+--- ---+-------+-------|
|
||||||
|
KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+--- ---+-------+-------|
|
||||||
|
KC_TRNS, KC_TRNS
|
||||||
|
//`-----------------------------------------------' `-----------------------------------------------'
|
||||||
|
),
|
||||||
|
[_ADJUST] = LAYOUT( \
|
||||||
|
//,-----------------------------------------------. ,-----------------------------------------------.
|
||||||
|
KC_TRNS, RGBRST,RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS,RGB_HUI,RGB_SAI,RGB_VAI,AG_SWAP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS,RGB_HUD,RGB_SAD,RGB_VAD,AG_NORM, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,\
|
||||||
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
|
KC_TRNS, KC_TRNS
|
||||||
|
//`-----------------------------------------------' `-----------------------------------------------'
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
int RGB_current_mode;
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
RGB_current_mode = rgblight_get_mode();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// set_timelog();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RGB_MOD:
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgblight_mode(RGB_current_mode);
|
||||||
|
rgblight_step();
|
||||||
|
RGB_current_mode = rgblight_get_mode();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RGBRST:
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_update_rgblight_default();
|
||||||
|
rgblight_enable();
|
||||||
|
RGB_current_mode = rgblight_get_mode();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
if (!is_keyboard_master()) {
|
||||||
|
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||||
|
}
|
||||||
|
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
void render_status(void) {
|
||||||
|
// Host Keyboard Layer Status
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_P(PSTR("Default\n"), false);
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
oled_write_P(PSTR("LOWER\n"), false);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
oled_write_P(PSTR("RAISE\n"), false);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
oled_write_P(PSTR("ADJUST\n"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||||
|
oled_write_ln_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Host Keyboard LED Status
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void render_logo(void) {
|
||||||
|
static const char PROGMEM qmk_logo[] = {
|
||||||
|
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||||
|
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||||
|
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
oled_write_P(qmk_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||||
|
} else {
|
||||||
|
render_logo(); // Renders a static logo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
@@ -0,0 +1,232 @@
|
|||||||
|
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||||
|
// See gfxfont.h for newer custom bitmap font info.
|
||||||
|
|
||||||
|
#include "progmem.h"
|
||||||
|
|
||||||
|
// Standard ASCII 5x7 font
|
||||||
|
const unsigned char font[] PROGMEM = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||||
|
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||||
|
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||||
|
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||||
|
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||||
|
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||||
|
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||||
|
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||||
|
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||||
|
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||||
|
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||||
|
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||||
|
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||||
|
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||||
|
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||||
|
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||||
|
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||||
|
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||||
|
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||||
|
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||||
|
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||||
|
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||||
|
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||||
|
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||||
|
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||||
|
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||||
|
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||||
|
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||||
|
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||||
|
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||||
|
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||||
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||||
|
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||||
|
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||||
|
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||||
|
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||||
|
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||||
|
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||||
|
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||||
|
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||||
|
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||||
|
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||||
|
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||||
|
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||||
|
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||||
|
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||||
|
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||||
|
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||||
|
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||||
|
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||||
|
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||||
|
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||||
|
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||||
|
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||||
|
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||||
|
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||||
|
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||||
|
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||||
|
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||||
|
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||||
|
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||||
|
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||||
|
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||||
|
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||||
|
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||||
|
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||||
|
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||||
|
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||||
|
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||||
|
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||||
|
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||||
|
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||||
|
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||||
|
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||||
|
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||||
|
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||||
|
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||||
|
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||||
|
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0,
|
||||||
|
0xF8, 0xF8, 0x00, 0xF8, 0xF8, 0xF0,
|
||||||
|
0xE0, 0x00, 0x00, 0x80, 0x80, 0x80,
|
||||||
|
0x80, 0x00, 0x00, 0x80, 0x80, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
|
||||||
|
0x00, 0x80, 0x80, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x9C, 0x9F, 0x9F, 0x9C, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x80, 0x80, 0x00, 0x80,
|
||||||
|
0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x80, 0x80, 0x80, 0x00, 0x80, 0x80,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
|
||||||
|
0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x60, 0x18,
|
||||||
|
0x07, 0x00, 0x80, 0x80, 0x80, 0x80,
|
||||||
|
0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
|
||||||
|
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
|
||||||
|
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
|
||||||
|
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
|
||||||
|
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
|
||||||
|
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
|
||||||
|
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0x20, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0x00, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||||
|
0x00, 0x00, 0xC6, 0xE7, 0xF7, 0xF7,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||||
|
0xFE, 0xFF, 0xFF, 0xFF, 0x00, 0x9F,
|
||||||
|
0x9F, 0x9F, 0x9E, 0x00, 0x00, 0xE7,
|
||||||
|
0xF7, 0xF7, 0xF7, 0x00, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x07, 0x07, 0x07,
|
||||||
|
0x03, 0x00, 0x7F, 0x7F, 0x3F, 0x1E,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||||
|
0x30, 0x0C, 0x02, 0x01, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x07, 0x07, 0x07, 0x07,
|
||||||
|
0x07, 0xF7, 0xF3, 0xF3, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
|
||||||
|
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
|
||||||
|
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
|
||||||
|
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
|
||||||
|
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
|
||||||
|
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
|
||||||
|
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
|
||||||
|
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F,
|
||||||
|
0x1F, 0x1F, 0x00, 0x1F, 0x1F, 0x1F,
|
||||||
|
0x1F, 0x00, 0x00, 0x1F, 0x1F, 0x1F,
|
||||||
|
0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x07, 0x0F, 0x0F, 0x1F,
|
||||||
|
0x00, 0x1F, 0x1F, 0x0F, 0x07, 0x00,
|
||||||
|
0x00, 0x07, 0x0F, 0x0F, 0x1F, 0x00,
|
||||||
|
0x1F, 0x1F, 0x0F, 0x07, 0x00, 0x00,
|
||||||
|
0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00,
|
||||||
|
0x07, 0x0F, 0x1F, 0x1F, 0x00, 0x1F,
|
||||||
|
0x0F, 0x0F, 0x07, 0x00, 0x00, 0x07,
|
||||||
|
0x0F, 0x1F, 0x1F, 0x00, 0x1F, 0x0F,
|
||||||
|
0x0F, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0,
|
||||||
|
0xE0, 0x00, 0xFF, 0xFE, 0xFE, 0x38,
|
||||||
|
0x00, 0x60, 0x10, 0x0C, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0x7F, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Arabica3/7
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A split keyboard with 3x6 column staggered keys, 1 pinkey and 3 thumb keys.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [CalciumNitride](https://github.com/CalciumNitride)
|
||||||
|
* Hardware Supported: Arabica3/7 PCB, Pro Micro
|
||||||
|
* Hardware Availability: [PCB & Case Data](https://github.com/calciumnitride/arabica37)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make arabica37/rev1:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
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 0x0001
|
||||||
|
#define MANUFACTURER CalciumNitride
|
||||||
|
#define PRODUCT Arabica3/7
|
||||||
|
#define DESCRIPTION A split keyboard with 3x6 column staggered keys, 1 pinkie key and 3 thumb keys
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
#define SOFT_SERIAL_PIN D2
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||||
|
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define 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
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
|
||||||
|
#define RGBLED_NUM 50 // Number of LEDs
|
||||||
|
#define RGBLED_SPLIT {25, 25}
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
// #define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
// #define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "arabica37.h"
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "arabica37.h"
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L26, L31, L32, R26, R30, R32, \
|
||||||
|
L30, R31 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L26, KC_NO, KC_NO, L30, L31, L32 }, \
|
||||||
|
{ R05, R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R15, R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R25, R24, R23, R22, R21, R20 }, \
|
||||||
|
{ R32, KC_NO, KC_NO, R31, R30, R26 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "bookerboard.h"
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, \
|
||||||
|
K10, K11, K12, \
|
||||||
|
K20, K21, K22, \
|
||||||
|
K30, K31, K32 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02 }, \
|
||||||
|
{ K10, K11, K12 }, \
|
||||||
|
{ K20, K21, K22 }, \
|
||||||
|
{ K30, K31, K32 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x41CE
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER AlisGraveNil
|
||||||
|
#define PRODUCT Bookerboard
|
||||||
|
#define DESCRIPTION A 12-key QMK-powered macropod
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
|
||||||
|
#define MATRIX_COL_PINS { B6, B2, B3 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "bookerboard",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 3,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 12,
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00 (B5,B6)", "x":0, "y":0},
|
||||||
|
{"label":"K01 (B5,B2)", "x":1, "y":0},
|
||||||
|
{"label":"K02 (B5,B3)", "x":2, "y":0},
|
||||||
|
{"label":"K10 (B4,B6)", "x":0, "y":1},
|
||||||
|
{"label":"K11 (B4,B2)", "x":1, "y":1},
|
||||||
|
{"label":"K12 (B4,B3)", "x":2, "y":1},
|
||||||
|
{"label":"K20 (E6,B6)", "x":0, "y":2},
|
||||||
|
{"label":"K21 (E6,B2)", "x":1, "y":2},
|
||||||
|
{"label":"K22 (E6,B3)", "x":2, "y":2},
|
||||||
|
{"label":"K30 (D7,B6)", "x":0, "y":3},
|
||||||
|
{"label":"K31 (D7,B2)", "x":1, "y":3},
|
||||||
|
{"label":"K32 (D7,B3)", "x":2, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* --------------
|
||||||
|
* | 7 | 8 | 9 |
|
||||||
|
* --------------
|
||||||
|
* | 4 | 5 | 6 |
|
||||||
|
* --------------
|
||||||
|
* | 1 | 2 | 3 |
|
||||||
|
* --------------
|
||||||
|
* | - | 0 | = |
|
||||||
|
* --------------
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_7, KC_8, KC_9,
|
||||||
|
KC_4, KC_5, KC_6,
|
||||||
|
KC_1, KC_2, KC_3,
|
||||||
|
KC_MINS, KC_0, KC_EQL
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Bookerboard
|
||||||
|
|
||||||
|
This is a 4x3 macropad designed to be used with your favorite 12 keys for whatever you need 12 extra keys for.
|
||||||
|
|
||||||
|
- Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil)
|
||||||
|
- Hardware Supported: Bookerboard, Pro Micro, Elite-C
|
||||||
|
- Hardware Availability: Not available yet; will be sold at a later date
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make clawsome/bookerboard: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).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4354 /* "CT" */
|
||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0x0001
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Cartel
|
#define MANUFACTURER Cartel
|
||||||
#define PRODUCT Contra
|
#define PRODUCT Contra
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_BASE,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Base
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Adjst| Ctrl | Gui | Alt |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BASE] = LAYOUT_planck_mit(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
MO(_ADJUST), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_planck_mit(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_planck_mit(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_PGDN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust
|
||||||
|
* ,----------------------------------------------------------- ------------------------.
|
||||||
|
* | | Reset| Debug| | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT_planck_mit(
|
||||||
|
_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# A basic Contra Layout with VIA enabled
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -81,7 +81,7 @@ led_config_t g_led_config = {
|
|||||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||||
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
||||||
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
||||||
{ 44, 45, 46, 47, 48, 49, 59, 51, 52, 53, 54, 55, NO_LED, 56, 57 },
|
{ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 },
|
||||||
{ 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, NO_LED, 66, 67 }
|
{ 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, NO_LED, 66, 67 }
|
||||||
}, {
|
}, {
|
||||||
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 203, 0 }, { 224, 0 },
|
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 203, 0 }, { 224, 0 },
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#undef DEBOUNCE
|
||||||
|
#define DEBOUNCE 10
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
/* Good on you for modifying your layout! if you don't have
|
||||||
|
* time to read the QMK docs, a list of keycodes can be found at
|
||||||
|
*
|
||||||
|
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
|
||||||
|
*
|
||||||
|
* There's also a template for adding new layers at the bottom of this file!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define NUMB 2 // numbers/motion
|
||||||
|
|
||||||
|
// Blank template at the bottom
|
||||||
|
|
||||||
|
enum customKeycodes {
|
||||||
|
URL = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | L1/ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ |
|
||||||
|
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
|
||||||
|
* |Ctrl/BS | A | S | D | F | G | RMB | | | H | J | K | L | ; : | ' " |
|
||||||
|
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | X | C | V | B | LMB | | | N | M | , < | . > | / ? |RShft/-_|
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* .----------. .-------. .------. .-----.
|
||||||
|
* | GUI/Del | |Ent/ALT| | Tab | |GUI |
|
||||||
|
* '----------' '-------' `------. '-----'
|
||||||
|
* ,-------. ,-------.
|
||||||
|
* | MMB | | PgDn |
|
||||||
|
* ,------|-------| |-------|------.
|
||||||
|
* | SYMB | NUMB | | SYMB | NUMB |
|
||||||
|
* | Space| Escape| | Mod |Space |
|
||||||
|
* | | | | | |
|
||||||
|
* `--------------' `--------------'
|
||||||
|
*/
|
||||||
|
[BASE] = LAYOUT_gergo(
|
||||||
|
LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
|
||||||
|
MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN3, KC_PGDN, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_MINS),
|
||||||
|
MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC), KC_TAB, KC_LGUI
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbols layer
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | ! | @ | { | } | | | | | | | | | \ | |
|
||||||
|
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` | | | | + | - | / | * | % | ' " |
|
||||||
|
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | = | , | . | / ? | - _ |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* .------. .------. .------. .-----.
|
||||||
|
* | | | | | | | DEL |
|
||||||
|
* '------' '------' `------. '-----'
|
||||||
|
* ,-------. ,-------.
|
||||||
|
* | | | PgUp |
|
||||||
|
* ,------|-------| |-------|------.
|
||||||
|
* | | | | | |
|
||||||
|
* | ; | = | | = | ; |
|
||||||
|
* | | | | | |
|
||||||
|
* `--------------' `--------------'
|
||||||
|
*/
|
||||||
|
[SYMB] = LAYOUT_gergo(
|
||||||
|
KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS,
|
||||||
|
KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
|
||||||
|
KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_PGUP, KC_DEL
|
||||||
|
),
|
||||||
|
/* Keymap 2: Pad/Function layer
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | | LEFT | DOWN | UP | RIGHT|VolDn | VolUp |
|
||||||
|
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
|
||||||
|
* | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT|Ply/Pa| Skip |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* .------. .------. .------. .-----.
|
||||||
|
* | | | | | | | |
|
||||||
|
* '------' '------' `------. '-----'
|
||||||
|
* ,-------. ,-------.
|
||||||
|
* | | | PgUp |
|
||||||
|
* ,------|-------| |-------|------.
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* `--------------' `--------------'
|
||||||
|
*/
|
||||||
|
[NUMB] = LAYOUT_gergo(
|
||||||
|
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU,
|
||||||
|
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Keymap template
|
||||||
|
*
|
||||||
|
* ,-------------------------------------------. ,-------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* .------. .------. .------. .-----.
|
||||||
|
* | | | | | | | |
|
||||||
|
* '------' '------' `------. '-----'
|
||||||
|
* ,-------. ,-------.
|
||||||
|
* | | | |
|
||||||
|
* ,------|-------| |-------|------.
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* `--------------' `--------------'
|
||||||
|
[SYMB] = LAYOUT_gergo(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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,10 @@
|
|||||||
|
# [Gergo! By g Heavy Industries](http://gboards.ca)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is my personal modification to the stock gergo keymap.
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk
|
||||||
|
|
||||||
|
Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# make gergo:germ:dfu
|
||||||
|
# Make sure you have dfu-programmer installed!
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Firmware options
|
||||||
|
BALLER = no # Enable to ball out
|
||||||
|
BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
|
||||||
|
SCROLLSTEP = 1 # Lines to scroll with ball
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller
|
||||||
|
|
||||||
|
#Debug options
|
||||||
|
VERBOSE = yes
|
||||||
|
DEBUG_MATRIX_SCAN_RATE = no
|
||||||
|
DEBUG_BALLER = no
|
||||||
|
DEBUG_MATRIX = yes
|
||||||
|
|
||||||
|
# A bunch of stuff that you shouldn't touch unless you
|
||||||
|
# know what you're doing.
|
||||||
|
#
|
||||||
|
# No touchy, capiche?
|
||||||
|
|
||||||
|
ifneq ($(strip $(BALLSTEP)),)
|
||||||
|
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
|
||||||
|
endif
|
||||||
|
ifneq ($(strip $(SCROLLSTEP)),)
|
||||||
|
OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $(BALLER)), yes)
|
||||||
|
POINTING_DEVICE_ENABLE = yes
|
||||||
|
OPT_DEFS += -DBALLER
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $(DEBUG_BALLER)), yes)
|
||||||
|
OPT_DEFS += -DDEBUG_BALLER
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $(DEBUG_MATRIX)), yes)
|
||||||
|
OPT_DEFS += -DDEBUG_MATRIX
|
||||||
|
endif
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
LAYOUT( EEP_RST )
|
||||||
|
};
|
||||||
@@ -0,0 +1,700 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file rt/templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
# define CHCONF_H
|
||||||
|
|
||||||
|
# define _CHIBIOS_RT_CONF_
|
||||||
|
# define _CHIBIOS_RT_CONF_VER_6_0_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_ST_RESOLUTION)
|
||||||
|
# define CH_CFG_ST_RESOLUTION 32
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_ST_FREQUENCY)
|
||||||
|
# define CH_CFG_ST_FREQUENCY 1000
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time intervals data size.
|
||||||
|
* @note Allowed values are 16, 32 or 64 bits.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_INTERVALS_SIZE)
|
||||||
|
# define CH_CFG_INTERVALS_SIZE 32
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time types data size.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_TIME_TYPES_SIZE)
|
||||||
|
# define CH_CFG_TIME_TYPES_SIZE 32
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_ST_TIMEDELTA)
|
||||||
|
# define CH_CFG_ST_TIMEDELTA 0
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_TIME_QUANTUM)
|
||||||
|
# define CH_CFG_TIME_QUANTUM 20
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_MEMCORE_SIZE)
|
||||||
|
# define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_NO_IDLE_THREAD)
|
||||||
|
# define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_OPTIMIZE_SPEED)
|
||||||
|
# define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_TM)
|
||||||
|
# define CH_CFG_USE_TM FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_REGISTRY)
|
||||||
|
# define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_WAITEXIT)
|
||||||
|
# define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_SEMAPHORES)
|
||||||
|
# define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
|
||||||
|
# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MUTEXES)
|
||||||
|
# define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
|
||||||
|
# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_CONDVARS)
|
||||||
|
# define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
|
||||||
|
# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_EVENTS)
|
||||||
|
# define CH_CFG_USE_EVENTS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
|
||||||
|
# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MESSAGES)
|
||||||
|
# define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
|
||||||
|
# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MAILBOXES)
|
||||||
|
# define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MEMCORE)
|
||||||
|
# define CH_CFG_USE_MEMCORE TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_HEAP)
|
||||||
|
# define CH_CFG_USE_HEAP TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_MEMPOOLS)
|
||||||
|
# define CH_CFG_USE_MEMPOOLS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects FIFOs APIs.
|
||||||
|
* @details If enabled then the objects FIFOs APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_OBJ_FIFOS)
|
||||||
|
# define CH_CFG_USE_OBJ_FIFOS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Pipes APIs.
|
||||||
|
* @details If enabled then the pipes APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_PIPES)
|
||||||
|
# define CH_CFG_USE_PIPES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_DYNAMIC)
|
||||||
|
# define CH_CFG_USE_DYNAMIC TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Objects factory options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects Factory APIs.
|
||||||
|
* @details If enabled then the objects factory APIs are included in the
|
||||||
|
* kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_USE_FACTORY)
|
||||||
|
# define CH_CFG_USE_FACTORY TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Maximum length for object names.
|
||||||
|
* @details If the specified length is zero then the name is stored by
|
||||||
|
* pointer but this could have unintended side effects.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
|
||||||
|
# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the registry of generic objects.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
|
||||||
|
# define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for generic buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
|
||||||
|
# define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for semaphores.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_SEMAPHORES)
|
||||||
|
# define CH_CFG_FACTORY_SEMAPHORES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for mailboxes.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_MAILBOXES)
|
||||||
|
# define CH_CFG_FACTORY_MAILBOXES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for objects FIFOs.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
|
||||||
|
# define CH_CFG_FACTORY_OBJ_FIFOS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for Pipes.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
|
||||||
|
# define CH_CFG_FACTORY_PIPES TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_STATISTICS)
|
||||||
|
# define CH_DBG_STATISTICS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
|
||||||
|
# define CH_DBG_SYSTEM_STATE_CHECK TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_ENABLE_CHECKS)
|
||||||
|
# define CH_DBG_ENABLE_CHECKS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_ENABLE_ASSERTS)
|
||||||
|
# define CH_DBG_ENABLE_ASSERTS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_TRACE_MASK)
|
||||||
|
# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
|
||||||
|
# define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_ENABLE_STACK_CHECK)
|
||||||
|
# define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_FILL_THREADS)
|
||||||
|
# define CH_DBG_FILL_THREADS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
# if !defined(CH_DBG_THREADS_PROFILING)
|
||||||
|
# define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System structure extension.
|
||||||
|
* @details User fields added to the end of the @p ch_system_t structure.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System initialization hook.
|
||||||
|
* @details User initialization code added to the @p chSysInit() function
|
||||||
|
* just before interrupts are enabled globally.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_INIT_HOOK() \
|
||||||
|
{ /* Add threads initialization code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p _thread_init() function.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p _thread_init() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_THREAD_INIT_HOOK(tp) \
|
||||||
|
{ /* Add threads initialization code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_THREAD_EXIT_HOOK(tp) \
|
||||||
|
{ /* Add threads finalization code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
|
||||||
|
{ /* Context switch code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IRQ_PROLOGUE_HOOK() \
|
||||||
|
{ /* IRQ prologue code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IRQ_EPILOGUE_HOOK() \
|
||||||
|
{ /* IRQ epilogue code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IDLE_ENTER_HOOK() \
|
||||||
|
{ /* Idle-enter code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IDLE_LEAVE_HOOK() \
|
||||||
|
{ /* Idle-leave code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_IDLE_LOOP_HOOK() \
|
||||||
|
{ /* Idle loop code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_TICK_HOOK() \
|
||||||
|
{ /* System tick event code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
|
||||||
|
{ /* System halt code here.*/ }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
# define CH_CFG_TRACE_HOOK(tep) \
|
||||||
|
{ /* Trace code here.*/ }
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Tracy Wadleigh
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
//#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xBEEF
|
||||||
|
#define PRODUCT_ID 0xCACA
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Tracy Wadleigh
|
||||||
|
#define PRODUCT tp69
|
||||||
|
#define DESCRIPTION A custom 69-key 65% keyboard with a trackpoint under keycap
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*/
|
||||||
|
/* 19 17 16 15 14 2 8 6 7 9 */
|
||||||
|
#define MATRIX_ROW_PINS { B2, B1, B0, C0, D1, D0, D3, D4, D2, C3 }
|
||||||
|
/* 20 21 18 0 1 3 4 5 */
|
||||||
|
#define MATRIX_COL_PINS { D5, D6, A4, B16, B17, A1, A2, D7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* for trackpoint: C1 (22) C2 (23) */
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
// #define RGB_DI_PIN E2
|
||||||
|
// #ifdef RGB_DI_PIN
|
||||||
|
// #define RGBLED_NUM 16
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
// #define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,524 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HALCONF_H
|
||||||
|
# define HALCONF_H
|
||||||
|
|
||||||
|
# define _CHIBIOS_HAL_CONF_
|
||||||
|
# define _CHIBIOS_HAL_CONF_VER_7_0_
|
||||||
|
|
||||||
|
# include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_PAL TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_ADC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_CAN FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the cryptographic subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_CRY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_DAC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_GPT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_I2C FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_I2S FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_ICU FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_MAC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_MMC_SPI FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_PWM FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_RTC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SDC FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SERIAL FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SERIAL_USB FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SIO subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SIO FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_SPI FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the TRNG subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_TRNG FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_UART FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_USB TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_WDG FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WSPI subsystem.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_USE_WSPI FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* PAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
# define PAL_USE_CALLBACKS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define PAL_USE_WAIT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define ADC_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
# define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
|
||||||
|
*/
|
||||||
|
# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
# define CAN_ENFORCE_USE_CALLBACKS FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CRY driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SW fall-back of the cryptographic driver.
|
||||||
|
* @details When enabled, this option, activates a fall-back software
|
||||||
|
* implementation for algorithms not supported by the underlying
|
||||||
|
* hardware.
|
||||||
|
* @note Fall-back implementations may not be present for all algorithms.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_CRY_USE_FALLBACK FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Makes the driver forcibly use the fall-back implementations.
|
||||||
|
*/
|
||||||
|
# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
# define HAL_CRY_ENFORCE_FALLBACK FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* DAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define DAC_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define DAC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the zero-copy API.
|
||||||
|
*/
|
||||||
|
# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
# define MAC_USE_ZERO_COPY FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
# define MAC_USE_EVENTS TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
# define MMC_NICE_WAITING TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_INIT_RETRY 100
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_MMC_SUPPORT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_NICE_WAITING TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for V20 cards.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_INIT_OCR_V20 0x50FF8000U
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for non-V20 cards.
|
||||||
|
*/
|
||||||
|
# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
|
||||||
|
# define SDC_INIT_OCR 0x80100000U
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 16 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_BUFFERS_SIZE 16
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 256 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB number of buffers.
|
||||||
|
* @note The default is 2 buffers.
|
||||||
|
*/
|
||||||
|
# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||||
|
# define SERIAL_USB_BUFFERS_NUMBER 2
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables circular transfers APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_USE_CIRCULAR FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handling method for SPI CS line.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
|
||||||
|
# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* UART driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define UART_USE_WAIT FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define USB_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* WSPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
# define WSPI_USE_WAIT TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
# define WSPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* HALCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Twadlee TP69",
|
||||||
|
"url": "https://github.com/twadleigh/qmk_firmware",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3}, {"x":13.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2}, {"x":5.75, "y":4}, {"x":6.75, "y":4}, {"x":7.75, "y":4}, {"x":8.75, "y":4, "w":2.25}, {"x":11, "y":4, "w":1.25}, {"x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4, "w":1.25}, {"x":14.75, "y":4, "w":1.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/* Copyright 2020 Tracy Wadleigh
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names { _BASE };
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_LGUI, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PGUP, KC_PGDN,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LALT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for tp69
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MCUCONF_H_
|
||||||
|
#define _MCUCONF_H_
|
||||||
|
|
||||||
|
#define KL2x_MCUCONF
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HAL driver system settings.
|
||||||
|
*/
|
||||||
|
/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */
|
||||||
|
#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
|
||||||
|
#define KINETIS_PLLCLK_FREQUENCY 96000000UL
|
||||||
|
#define KINETIS_SYSCLK_FREQUENCY 48000000UL
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define KINETIS_SERIAL_USE_UART0 TRUE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB driver settings
|
||||||
|
*/
|
||||||
|
#define KINETIS_USB_USE_USB0 TRUE
|
||||||
|
|
||||||
|
/* Need to redefine this, since the default (configured for K20x) might not apply
|
||||||
|
* 2 for Teensy LC
|
||||||
|
* 5 for Teensy 3.x */
|
||||||
|
#define KINETIS_USB_USB0_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
#endif /* _MCUCONF_H_ */
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Twadlee TP69
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 69-key keyboard having a Trackpoint unit under an additional 70th keycap.
|
||||||
|
|
||||||
|
The layout is similar to a conventional 60% keyboard, but with additional 1u keys down a central split. The spacebar is also split, with the intervening space occupied by three mouse buttons and the left half replaced by a relocated `BACKSPACE` key. The right half of the spacebar is 2.25u. The space vacated by the `BACKSPACE` key is split into two additional 1u keys. The additional keycap on the home row does not cover a switch but a Trackpoint pointing device. All told, the 61 keycaps of the conventional 60% layout are augmented by an additional 9 1u keycaps, and a 2.25u keycap to replace the conventional 6.25u spacebar.
|
||||||
|
|
||||||
|
Given the unconventional layout, only non-sculpted keycap profiles are practical. I use DSAs.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Tracy Wadleigh](https://github.com/twadleigh)
|
||||||
|
* Hardware Supported: Teensy LC controller
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/twadlee/tp69: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).
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = MKL26Z64
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
PS2_MOUSE_ENABLE = no
|
||||||
|
|
||||||
|
USE_CHIBIOS_CONTRIB = yes
|
||||||
|
|
||||||
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/* Copyright 2020 Tracy Wadleigh
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 "tp69.h"
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* Copyright 2020 Tracy Wadleigh
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \
|
||||||
|
k10, k11, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k66, k67, \
|
||||||
|
k20, k21, k23, k24, k25, k27, /**/ k70, k71, k72, k73, k74, k75, k77, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k81, k82, k83, k84, k85, k86, \
|
||||||
|
k40, k41, k43, k44, k46, k47, k91, k92, k94, k95, k96, k97 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07}, \
|
||||||
|
{ k10, k11, KC_NO, k13, k14, k15, k16, k17}, \
|
||||||
|
{ k20, k21, KC_NO, k23, k24, k25, KC_NO, k27}, \
|
||||||
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37}, \
|
||||||
|
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, k47}, \
|
||||||
|
{ k50, k51, k52, k53, k54, k55, k56, k57}, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65, k66, k67}, \
|
||||||
|
{ k70, k71, k72, k73, k74, k75, KC_NO, k77}, \
|
||||||
|
{KC_NO, k81, k82, k83, k84, k85, k86, KC_NO}, \
|
||||||
|
{KC_NO, k91, k92, KC_NO, k94, k95, k96, k97} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"backcolor": "",
|
||||||
|
"name": "65% keyboard with pointing device under keycap",
|
||||||
|
"author": "Tracy Wadleigh",
|
||||||
|
"plate": false
|
||||||
|
},
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"a": 7,
|
||||||
|
"f": 5
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"w": 1.75
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"x": 1
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 2.25
|
||||||
|
},
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"w": 2.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 2.75
|
||||||
|
},
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 2
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 2.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
""
|
||||||
|
]
|
||||||
|
]
|
||||||
@@ -0,0 +1,251 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 KBDClack
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x1A81
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER KBDClack
|
||||||
|
#define PRODUCT kaishi65
|
||||||
|
#define DESCRIPTION KBDClack made 65% PCB based on the MULLET from coseyfannitutti
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, B0, F0, F1 }
|
||||||
|
#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
// #define RGB_DI_PIN E2
|
||||||
|
// #ifdef RGB_DI_PIN
|
||||||
|
// #define RGBLED_NUM 16
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
// #define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "kaishi65",
|
||||||
|
"url": "https://github.com/powerlemming/KBDClack",
|
||||||
|
"maintainer": "KBDClack",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_65_ansi": {
|
||||||
|
"layout": [{"label":"esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Pg up", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"up", "x":14, "y":3}, {"label":"Pg dn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"left", "x":13, "y":4}, {"label":"down", "x":14, "y":4}, {"label":"right", "x":15, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 KBDClack
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 "kaishi65.h"
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2020 KBDClack
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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"
|
||||||
|
|
||||||
|
#define _x_ KC_NO
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_65_ansi( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
|
||||||
|
K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \
|
||||||
|
{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
|
||||||
|
{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/* Copyright 2020 KBDClack
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[_BASE] = LAYOUT_65_ansi(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[_FN] = LAYOUT_65_ansi(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______,
|
||||||
|
_______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS,
|
||||||
|
_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_VOLU, KC_END,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for kaishi65
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# kaishi65
|
||||||
|
A sleek 65% keyboard made from CNC machined aluminium
|
||||||
|
|
||||||
|
*(PCB based on coseyfannitutti's MULLET design)*
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [KBDClack](https://github.com/powerlemming)
|
||||||
|
* Hardware Supported: The kaishi65 line of products (case + PCB)
|
||||||
|
* Hardware Availability: www.kbdclack.com
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make kbdclack/kaishi65: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).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
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
|
||||||
|
|
||||||
|
LAYOUTS = 65_ansi
|
||||||
@@ -15,9 +15,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_MPLY, KC_PSLS, KC_PAST, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MYRGB_TG, KC_PGUP, \
|
KC_MPLY, KC_PSLS, KC_PAST, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MYRGB_TG, KC_PGUP, \
|
||||||
KC_MUTE, KC_PPLS, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_PGDN, \
|
KC_MUTE, KC_PPLS, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_PGDN, \
|
||||||
KC_P7, KC_P8, KC_P9, 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_HOME, \
|
KC_P7, KC_P8, KC_P9, 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_HOME, \
|
||||||
KC_P4, KC_P5, KC_P6, KC_BSPACE, 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_CAPS, KC_PSCR, \
|
KC_P4, KC_P5, KC_P6, KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, KC_PSCR, \
|
||||||
KC_P1, KC_P2, KC_P3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, XXXXXXX, KC_INS, \
|
KC_P1, KC_P2, KC_P3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_CAPS, KC_INS, \
|
||||||
KC_P0, KC_PDOT, KC_PENT, TO(_LIST), KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \
|
KC_P0, KC_PDOT, KC_PENT, KC_LCTL, TO(_LIST), KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_NLCK \
|
||||||
),
|
),
|
||||||
|
|
||||||
[_LIST] = LAYOUT( \
|
[_LIST] = LAYOUT( \
|
||||||
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* The way how "handedness" is decided (which half is which),
|
||||||
|
see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
|
||||||
|
for more options.
|
||||||
|
*/
|
||||||
@@ -0,0 +1,392 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum sofle_layers {
|
||||||
|
/* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
KC_QWERTY = SAFE_RANGE,
|
||||||
|
KC_COLEMAK,
|
||||||
|
KC_LOWER,
|
||||||
|
KC_RAISE,
|
||||||
|
KC_ADJUST,
|
||||||
|
KC_PRVWD,
|
||||||
|
KC_NXTWD,
|
||||||
|
KC_LSTRT,
|
||||||
|
KC_LEND,
|
||||||
|
KC_DLINE
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* QWERTY
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
|
||||||
|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
|
||||||
|
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||||
|
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
|
||||||
|
* | | | | |/ / \ \ | | | | |
|
||||||
|
* `----------------------------------' '------''---------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI \
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
* COLEMAK
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
|
||||||
|
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
|
||||||
|
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
|
||||||
|
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||||
|
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
|
||||||
|
* | | | | |/ / \ \ | | | | |
|
||||||
|
* `----------------------------------' '------''---------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_COLEMAK] = LAYOUT( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||||
|
KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LGUI,KC_LALT,KC_LCTRL,KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI \
|
||||||
|
),
|
||||||
|
/* LOWER
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
|
||||||
|
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
|
||||||
|
* | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
|
||||||
|
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||||
|
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
|
||||||
|
* | | | | |/ / \ \ | | | | |
|
||||||
|
* `----------------------------------' '------''---------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT( \
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,\
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, \
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
|
||||||
|
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
|
||||||
|
),
|
||||||
|
/* RAISE
|
||||||
|
* ,----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
|
||||||
|
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
|
||||||
|
* |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
|
||||||
|
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||||
|
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
|
||||||
|
* | | | | |/ / \ \ | | | | |
|
||||||
|
* `----------------------------------' '------''---------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT( \
|
||||||
|
_______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, \
|
||||||
|
_______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC, \
|
||||||
|
_______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, \
|
||||||
|
_______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
/* ADJUST
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | RESET| |QWERTY|COLEMAK| | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
|
||||||
|
* |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
|
||||||
|
* | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
|
||||||
|
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||||
|
* | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
|
||||||
|
* | | | | |/ / \ \ | | | | |
|
||||||
|
* `----------------------------------' '------''---------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT( \
|
||||||
|
XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
RESET , XXXXXXX,KC_QWERTY,KC_COLEMAK,CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
|
static void render_logo(void) {
|
||||||
|
static const char PROGMEM qmk_logo[] = {
|
||||||
|
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||||
|
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||||
|
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0
|
||||||
|
};
|
||||||
|
|
||||||
|
oled_write_P(qmk_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void print_status_narrow(void) {
|
||||||
|
// Print current mode
|
||||||
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
|
oled_write_ln_P(PSTR("MODE"), false);
|
||||||
|
oled_write_ln_P(PSTR(""), false);
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
oled_write_ln_P(PSTR("MAC"), false);
|
||||||
|
} else {
|
||||||
|
oled_write_ln_P(PSTR("WIN"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (get_highest_layer(default_layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_ln_P(PSTR("Qwrt"), false);
|
||||||
|
break;
|
||||||
|
case _COLEMAK:
|
||||||
|
oled_write_ln_P(PSTR("Clmk"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_P(PSTR("Undef"), false);
|
||||||
|
}
|
||||||
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
|
// Print current layer
|
||||||
|
oled_write_ln_P(PSTR("LAYER"), false);
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _COLEMAK:
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_P(PSTR("Base\n"), false);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
oled_write_P(PSTR("Raise"), false);
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
oled_write_P(PSTR("Lower"), false);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
oled_write_P(PSTR("Adj\n"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("Undef"), false);
|
||||||
|
}
|
||||||
|
oled_write_P(PSTR("\n\n"), false);
|
||||||
|
led_t led_usb_state = host_keyboard_led_state();
|
||||||
|
oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
return OLED_ROTATION_270;
|
||||||
|
}
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
print_status_narrow();
|
||||||
|
} else {
|
||||||
|
render_logo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_PRVWD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
register_mods(mod_config(MOD_LALT));
|
||||||
|
register_code(KC_LEFT);
|
||||||
|
} else {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_LEFT);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
unregister_mods(mod_config(MOD_LALT));
|
||||||
|
unregister_code(KC_LEFT);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_LEFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KC_NXTWD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
register_mods(mod_config(MOD_LALT));
|
||||||
|
register_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_RIGHT);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
unregister_mods(mod_config(MOD_LALT));
|
||||||
|
unregister_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_RIGHT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KC_LSTRT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
//CMD-arrow on Mac, but we have CTL and GUI swapped
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_LEFT);
|
||||||
|
} else {
|
||||||
|
register_code(KC_HOME);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_LEFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_HOME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KC_LEND:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
//CMD-arrow on Mac, but we have CTL and GUI swapped
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
register_code(KC_END);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (keymap_config.swap_lctl_lgui) {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_RIGHT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_END);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KC_DLINE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_BSPC);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KC_COPY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_C);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_C);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_PASTE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_V);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_V);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case KC_CUT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_X);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_X);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case KC_UNDO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_mods(mod_config(MOD_LCTL));
|
||||||
|
register_code(KC_Z);
|
||||||
|
} else {
|
||||||
|
unregister_mods(mod_config(MOD_LCTL));
|
||||||
|
unregister_code(KC_Z);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_PGDOWN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
# Default keymap for Sofle Keyboard
|
||||||
|
|
||||||
|
Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4)
|
||||||
|
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift)
|
||||||
|
- Various modes, can be switched (using Adjust layer and the selected one is stored in EEPROM.
|
||||||
|
- Modes for Qwerty and Colemak support
|
||||||
|
- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often.
|
||||||
|
- The OLED on master half shows selected mode and caps lock state and is rotated.
|
||||||
|
- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN.
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# Sofle Keyboard
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Sofle is 6×4+5 keys column-staggered split keyboard. Based on Lily58, Corne and Helix keyboards.
|
||||||
|
|
||||||
|
More details about the keyboard on my blog: [Let me introduce you SofleKeyboard - a split keyboard based on Lily58 and Crkbd](https://josef-adamcik.cz/electronics/let-me-introduce-you-sofle-keyboard-split-keyboard-based-on-lily58.html)
|
||||||
|
|
||||||
|
The current (temporary) build guide and a build log is available here: [SofleKeyboard build log/guide](https://josef-adamcik.cz/electronics/soflekeyboard-build-log-and-build-guide.html)
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Josef Adamcik](https://josef-adamcik.cz) [Twitter:@josefadamcik](https://twitter.com/josefadamcik)
|
||||||
|
* Hardware Supported: SofleKeyboard PCB, ProMicro
|
||||||
|
* Hardware Availability: [PCB & Case Data](https://github.com/josefadamcik/SofleKeyboard)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make sofle:default
|
||||||
|
|
||||||
|
Flash the default keymap:
|
||||||
|
|
||||||
|
make sofle:default:avrdude
|
||||||
|
|
||||||
|
Press reset button on he keyboard when asked.
|
||||||
|
|
||||||
|
Disconnect the first half, connect the second one and repeat the process.
|
||||||
|
|
||||||
|
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).
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFC32
|
||||||
|
#define PRODUCT_ID 0x0287
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER JosefAdamcik
|
||||||
|
#define PRODUCT Sofle
|
||||||
|
#define DESCRIPTION Sofle is 6×4+5keys+encoder column-staggered split keyboard.
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||||
|
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define TAPPING_TERM 100
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* encoder support */
|
||||||
|
#define ENCODERS_PAD_A { F5 }
|
||||||
|
#define ENCODERS_PAD_B { F4 }
|
||||||
|
#define ENCODERS_PAD_A_RIGHT { F4 }
|
||||||
|
#define ENCODERS_PAD_B_RIGHT { F5 }
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
|
|
||||||
|
#define TAP_CODE_DELAY 10
|
||||||
|
|
||||||
|
/* communication between sides */
|
||||||
|
#define USE_SERIAL
|
||||||
|
#define SERIAL_USE_MULTI_TRANSACTION
|
||||||
|
#define SOFT_SERIAL_PIN D2
|
||||||
|
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Sofle",
|
||||||
|
"url": "https://github.com/josefadamcik/SofleKeyboard",
|
||||||
|
"maintainer": "Josef Adamcik <[email protected]>",
|
||||||
|
"width": 16.5,
|
||||||
|
"height": 5.25,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 60,
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5},
|
||||||
|
{"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5},
|
||||||
|
{"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5},
|
||||||
|
{"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5},
|
||||||
|
{"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.125}, {"x":14, "y":4.375}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "sofle.h"
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \
|
||||||
|
L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45 }, \
|
||||||
|
{ R05, R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R15, R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R25, R24, R23, R22, R21, R20 }, \
|
||||||
|
{ R35, R34, R33, R32, R31, R30 }, \
|
||||||
|
{ R45, R44, R43, R42, R41, R40 } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ENCODER_ENABLE = yes
|
||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
MCU = atmega32u4
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
|
DEFAULT_FOLDER = sofle/rev1
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "sofle.h"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_sofle_rev1
|
||||||
|
#include "rev1.h"
|
||||||
|
#endif
|
||||||
@@ -440,6 +440,8 @@ void rgb_matrix_set_suspend_state(bool state) {
|
|||||||
g_suspend_state = state;
|
g_suspend_state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rgb_matrix_get_suspend_state(void) { return g_suspend_state; }
|
||||||
|
|
||||||
void rgb_matrix_toggle(void) {
|
void rgb_matrix_toggle(void) {
|
||||||
rgb_matrix_config.enable ^= 1;
|
rgb_matrix_config.enable ^= 1;
|
||||||
rgb_task_state = STARTING;
|
rgb_task_state = STARTING;
|
||||||
@@ -466,6 +468,8 @@ void rgb_matrix_disable_noeeprom(void) {
|
|||||||
rgb_matrix_config.enable = 0;
|
rgb_matrix_config.enable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; }
|
||||||
|
|
||||||
void rgb_matrix_step(void) {
|
void rgb_matrix_step(void) {
|
||||||
rgb_matrix_config.mode++;
|
rgb_matrix_config.mode++;
|
||||||
if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1;
|
if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1;
|
||||||
@@ -521,6 +525,8 @@ void rgb_matrix_decrease_speed(void) {
|
|||||||
eeconfig_update_rgb_matrix();
|
eeconfig_update_rgb_matrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; }
|
||||||
|
|
||||||
led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; }
|
led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; }
|
||||||
|
|
||||||
void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; }
|
void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; }
|
||||||
@@ -546,3 +552,8 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) {
|
|||||||
rgb_matrix_config.hsv.v = val;
|
rgb_matrix_config.hsv.v = val;
|
||||||
if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
|
if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; }
|
||||||
|
uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; }
|
||||||
|
uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; }
|
||||||
|
uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; }
|
||||||
@@ -104,11 +104,13 @@ void rgb_matrix_indicators_user(void);
|
|||||||
void rgb_matrix_init(void);
|
void rgb_matrix_init(void);
|
||||||
|
|
||||||
void rgb_matrix_set_suspend_state(bool state);
|
void rgb_matrix_set_suspend_state(bool state);
|
||||||
|
bool rgb_matrix_get_suspend_state(void);
|
||||||
void rgb_matrix_toggle(void);
|
void rgb_matrix_toggle(void);
|
||||||
void rgb_matrix_enable(void);
|
void rgb_matrix_enable(void);
|
||||||
void rgb_matrix_enable_noeeprom(void);
|
void rgb_matrix_enable_noeeprom(void);
|
||||||
void rgb_matrix_disable(void);
|
void rgb_matrix_disable(void);
|
||||||
void rgb_matrix_disable_noeeprom(void);
|
void rgb_matrix_disable_noeeprom(void);
|
||||||
|
uint8_t rgb_matrix_is_enabled(void);
|
||||||
void rgb_matrix_step(void);
|
void rgb_matrix_step(void);
|
||||||
void rgb_matrix_step_reverse(void);
|
void rgb_matrix_step_reverse(void);
|
||||||
void rgb_matrix_increase_hue(void);
|
void rgb_matrix_increase_hue(void);
|
||||||
@@ -119,6 +121,7 @@ void rgb_matrix_increase_val(void);
|
|||||||
void rgb_matrix_decrease_val(void);
|
void rgb_matrix_decrease_val(void);
|
||||||
void rgb_matrix_increase_speed(void);
|
void rgb_matrix_increase_speed(void);
|
||||||
void rgb_matrix_decrease_speed(void);
|
void rgb_matrix_decrease_speed(void);
|
||||||
|
uint8_t rgb_matrix_get_speed(void);
|
||||||
led_flags_t rgb_matrix_get_flags(void);
|
led_flags_t rgb_matrix_get_flags(void);
|
||||||
void rgb_matrix_set_flags(led_flags_t flags);
|
void rgb_matrix_set_flags(led_flags_t flags);
|
||||||
void rgb_matrix_mode(uint8_t mode);
|
void rgb_matrix_mode(uint8_t mode);
|
||||||
@@ -126,6 +129,10 @@ void rgb_matrix_mode_noeeprom(uint8_t mode);
|
|||||||
uint8_t rgb_matrix_get_mode(void);
|
uint8_t rgb_matrix_get_mode(void);
|
||||||
void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
|
void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
|
||||||
void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
|
void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
|
||||||
|
HSV rgb_matrix_get_hsv(void);
|
||||||
|
uint8_t rgb_matrix_get_hue(void);
|
||||||
|
uint8_t rgb_matrix_get_sat(void);
|
||||||
|
uint8_t rgb_matrix_get_val(void);
|
||||||
|
|
||||||
#ifndef RGBLIGHT_ENABLE
|
#ifndef RGBLIGHT_ENABLE
|
||||||
# define rgblight_toggle rgb_matrix_toggle
|
# define rgblight_toggle rgb_matrix_toggle
|
||||||
@@ -133,6 +140,7 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
|
|||||||
# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom
|
# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom
|
||||||
# define rgblight_disable rgb_matrix_disable
|
# define rgblight_disable rgb_matrix_disable
|
||||||
# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom
|
# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom
|
||||||
|
# define rgblight_is_enabled rgb_matrix_is_enabled
|
||||||
# define rgblight_step rgb_matrix_step
|
# define rgblight_step rgb_matrix_step
|
||||||
# define rgblight_sethsv rgb_matrix_sethsv
|
# define rgblight_sethsv rgb_matrix_sethsv
|
||||||
# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom
|
# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom
|
||||||
@@ -145,9 +153,14 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
|
|||||||
# define rgblight_decrease_val rgb_matrix_decrease_val
|
# define rgblight_decrease_val rgb_matrix_decrease_val
|
||||||
# define rgblight_increase_speed rgb_matrix_increase_speed
|
# define rgblight_increase_speed rgb_matrix_increase_speed
|
||||||
# define rgblight_decrease_speed rgb_matrix_decrease_speed
|
# define rgblight_decrease_speed rgb_matrix_decrease_speed
|
||||||
|
# define rgblight_get_speed rgb_matrix_get_speed
|
||||||
# define rgblight_mode rgb_matrix_mode
|
# define rgblight_mode rgb_matrix_mode
|
||||||
# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom
|
# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom
|
||||||
# define rgblight_get_mode rgb_matrix_get_mode
|
# define rgblight_get_mode rgb_matrix_get_mode
|
||||||
|
# define rgblight_get_hue rgb_matrix_get_hue
|
||||||
|
# define rgblight_get_sat rgb_matrix_get_sat
|
||||||
|
# define rgblight_get_val rgb_matrix_get_val
|
||||||
|
# define rgblight_get_hsv rgb_matrix_get_hsv
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -368,6 +368,8 @@ void rgblight_disable_noeeprom(void) {
|
|||||||
rgblight_set();
|
rgblight_set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rgblight_is_enabled(void) { return rgblight_config.enable; }
|
||||||
|
|
||||||
void rgblight_increase_hue_helper(bool write_to_eeprom) {
|
void rgblight_increase_hue_helper(bool write_to_eeprom) {
|
||||||
uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP;
|
uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP;
|
||||||
rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
|
rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
|
||||||
@@ -522,6 +524,8 @@ uint8_t rgblight_get_sat(void) { return rgblight_config.sat; }
|
|||||||
|
|
||||||
uint8_t rgblight_get_val(void) { return rgblight_config.val; }
|
uint8_t rgblight_get_val(void) { return rgblight_config.val; }
|
||||||
|
|
||||||
|
HSV rgblight_get_hsv(void) { return (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; }
|
||||||
|
|
||||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
|
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
if (!rgblight_config.enable) {
|
if (!rgblight_config.enable) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -350,6 +350,8 @@ uint8_t rgblight_get_mode(void);
|
|||||||
uint8_t rgblight_get_hue(void);
|
uint8_t rgblight_get_hue(void);
|
||||||
uint8_t rgblight_get_sat(void);
|
uint8_t rgblight_get_sat(void);
|
||||||
uint8_t rgblight_get_val(void);
|
uint8_t rgblight_get_val(void);
|
||||||
|
bool rgblight_is_enabled(void);
|
||||||
|
HSV rgblight_get_hsv(void);
|
||||||
|
|
||||||
/* === qmk_firmware (core)internal Functions === */
|
/* === qmk_firmware (core)internal Functions === */
|
||||||
void rgblight_init(void);
|
void rgblight_init(void);
|
||||||
|
|||||||
Reference in new issue
Block a user