Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d5a8b048a | ||
|
|
978fa700d8 | ||
|
|
03766619d5 | ||
|
|
3d7428a333 | ||
|
|
60ca50808f | ||
|
|
0a8d529d74 | ||
|
|
c418608c1e | ||
|
|
956e0bb4b8 | ||
|
|
218d51094e | ||
|
|
36d35959c8 | ||
|
|
0210447c82 | ||
|
|
7fef5ca240 | ||
|
|
8906e62c1f | ||
|
|
5953af3215 | ||
|
|
e36cbdc786 | ||
|
|
3f3a1cc9f3 | ||
|
|
8dd85f73b3 | ||
|
|
3d6919c3dc | ||
|
|
db8b547b7d | ||
|
|
77445afac5 | ||
|
|
b9bf310b0f | ||
|
|
1f9ee8b990 | ||
|
|
090b4a81b9 | ||
|
|
7eeb8932a1 | ||
|
|
876377e945 | ||
|
|
3bbf11d110 | ||
|
|
3204dec096 | ||
|
|
d5def73f6e | ||
|
|
d7881f3504 | ||
|
|
57fdce91bf | ||
|
|
40b4f27b03 | ||
|
|
c197d080c4 | ||
|
|
df73b74b55 | ||
|
|
d49e4543b3 | ||
|
|
a120bbc4de | ||
|
|
3f886a3efe | ||
|
|
08c1997db1 | ||
|
|
9c2dde98e2 | ||
|
|
a7df902734 | ||
|
|
dad851d47d | ||
|
|
a3c7f30971 | ||
|
|
f8f1b6fac8 | ||
|
|
c3d429bcb6 | ||
|
|
90c384f650 | ||
|
|
47957c3f77 | ||
|
|
63b0290708 | ||
|
|
e8d2f4f891 | ||
|
|
29954efd06 | ||
|
|
738eab0bb1 | ||
|
|
0470017c21 | ||
|
|
585f753ffe | ||
|
|
c8e1397e08 | ||
|
|
87d9bb461b | ||
|
|
155375ea32 | ||
|
|
dca2c2a439 | ||
|
|
701fed2e15 | ||
|
|
1230ecb73d | ||
|
|
b79c324642 | ||
|
|
5709e1b602 | ||
|
|
1499dffb07 | ||
|
|
b4888eee14 | ||
|
|
91e8e8d916 | ||
|
|
09bb020a55 | ||
|
|
03381962ac | ||
|
|
a980a7972c | ||
|
|
526eabb6f8 | ||
|
|
e448ef0b1a | ||
|
|
ded51136ce | ||
|
|
1038bbef40 | ||
|
|
d80774027e | ||
|
|
f5f0e93230 | ||
|
|
6590f3c811 | ||
|
|
08283f6124 | ||
|
|
7a44ad83fc | ||
|
|
6380f83190 | ||
|
|
76e0d23887 | ||
|
|
bad56a4f2b | ||
|
|
b8564f5dd0 | ||
|
|
998ddbb122 | ||
|
|
c0095710a7 | ||
|
|
682555faac | ||
|
|
6dc215cd67 | ||
|
|
5272218ac9 | ||
|
|
0592d23b74 | ||
|
|
b5e7589bf9 | ||
|
|
3d00f38586 |
No files matched your search
Vendored
+8
-29
@@ -2,27 +2,8 @@
|
|||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
Vagrant.configure(2) do |config|
|
Vagrant.configure(2) do |config|
|
||||||
# You can only have one config.vm.box uncommented at a time
|
|
||||||
|
|
||||||
# Comment this and uncomment another if you don't want to use the minimal Arch box
|
|
||||||
#config.vm.box = "dragon788/arch-ala-elasticdog"
|
|
||||||
|
|
||||||
# VMware/Virtualbox 64 bit
|
# VMware/Virtualbox 64 bit
|
||||||
config.vm.box = "phusion/ubuntu-14.04-amd64"
|
config.vm.box = "phusion/ubuntu-14.04-amd64"
|
||||||
#
|
|
||||||
# VMware/Virtualbox 64 bit
|
|
||||||
#config.vm.box = "puphpet/centos65-x64"
|
|
||||||
#
|
|
||||||
# The opensuse boxes don't have dfu-util in their default repositories
|
|
||||||
#
|
|
||||||
# The virtualbox version has tools issues
|
|
||||||
# VMware/Virtualbox 64 bit
|
|
||||||
#config.vm.box = "bento/opensuse-13.2-x86_64"
|
|
||||||
#
|
|
||||||
# Virtualbox only
|
|
||||||
#config.vm.box = "bento/opensuse-13.2-i386"
|
|
||||||
# config.vm.box = ""
|
|
||||||
# config.vm.box = ""
|
|
||||||
|
|
||||||
# This section allows you to customize the Virtualbox VM
|
# This section allows you to customize the Virtualbox VM
|
||||||
# settings, ie showing the GUI or upping the memory
|
# settings, ie showing the GUI or upping the memory
|
||||||
@@ -81,18 +62,16 @@ Vagrant.configure(2) do |config|
|
|||||||
config.vm.provision "shell", run: "always", path: "./util/install_dependencies.sh", args: "-update"
|
config.vm.provision "shell", run: "always", path: "./util/install_dependencies.sh", args: "-update"
|
||||||
|
|
||||||
config.vm.post_up_message = <<-EOT
|
config.vm.post_up_message = <<-EOT
|
||||||
Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)
|
|
||||||
or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool
|
|
||||||
|
|
||||||
Change directory (cd) to the keyboard you wish to program
|
Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is
|
||||||
(Optionally) modify your layout,
|
located at /vagrant
|
||||||
then run 'make clean'
|
To compile the .hex files use make command inside this directory.
|
||||||
and then 'make' to compile the .eep and .hex files.
|
|
||||||
|
|
||||||
Or you can copy and paste the example line below.
|
|
||||||
|
|
||||||
cd /vagrant; cd keyboards; cd ergodox; make clean; make
|
|
||||||
|
|
||||||
|
QMK's make format recently changed to use folder locations and colons:
|
||||||
|
make project_folder:keymap[:target]
|
||||||
|
Examples:
|
||||||
|
make planck/rev4:default:dfu
|
||||||
|
make planck:default
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
end
|
end
|
||||||
@@ -123,21 +123,23 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
## Behaviors That Can Be Configured
|
## Behaviors That Can Be Configured
|
||||||
|
|
||||||
* `#define TAPPING_TERM 200`
|
* `#define TAPPING_TERM 200`
|
||||||
* how long before a tap becomes a hold
|
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
|
||||||
* `#define RETRO_TAPPING`
|
* `#define RETRO_TAPPING`
|
||||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||||
* `#define TAPPING_TOGGLE 2`
|
* `#define TAPPING_TOGGLE 2`
|
||||||
* how many taps before triggering the toggle
|
* how many taps before triggering the toggle
|
||||||
* `#define PERMISSIVE_HOLD`
|
* `#define PERMISSIVE_HOLD`
|
||||||
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||||
|
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||||
|
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||||
|
* `#define TAPPING_FORCE_HOLD`
|
||||||
|
* makes it possible to use a dual role key as modifier shortly after having been tapped
|
||||||
* `#define LEADER_TIMEOUT 300`
|
* `#define LEADER_TIMEOUT 300`
|
||||||
* how long before the leader key times out
|
* how long before the leader key times out
|
||||||
* `#define ONESHOT_TIMEOUT 300`
|
* `#define ONESHOT_TIMEOUT 300`
|
||||||
* how long before oneshot times out
|
* how long before oneshot times out
|
||||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||||
* how many taps before oneshot toggle is triggered
|
* how many taps before oneshot toggle is triggered
|
||||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
|
||||||
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
|
||||||
* `#define QMK_KEYS_PER_SCAN 4`
|
* `#define QMK_KEYS_PER_SCAN 4`
|
||||||
* Allows sending more than one key per scan. By default, only one key event gets
|
* Allows sending more than one key per scan. By default, only one key event gets
|
||||||
sent via `process_record()` per scan. This has little impact on most typing, but
|
sent via `process_record()` per scan. This has little impact on most typing, but
|
||||||
|
|||||||
@@ -104,3 +104,17 @@ brew install dfu-programmer
|
|||||||
brew install gcc-arm-none-eabi
|
brew install gcc-arm-none-eabi
|
||||||
brew install avrdude
|
brew install avrdude
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### avr-gcc 8.1 and LUFA
|
||||||
|
|
||||||
|
If you updated your avr-gcc to above 7 you may see errors involving LUFA. For example:
|
||||||
|
|
||||||
|
`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'`
|
||||||
|
|
||||||
|
For now, you need to rollback avr-gcc to 7 in brew.
|
||||||
|
|
||||||
|
```
|
||||||
|
brew uninstall --force avr-gcc
|
||||||
|
brew install avr-gcc@7
|
||||||
|
brew link avr-gcc@7
|
||||||
|
```
|
||||||
@@ -175,3 +175,31 @@ Example: (Tapping Term = 200ms)
|
|||||||
- SHFT_T(KC_A) Up
|
- SHFT_T(KC_A) Up
|
||||||
|
|
||||||
With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
|
With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
|
||||||
|
|
||||||
|
# Mod tap interrupt
|
||||||
|
|
||||||
|
When a dual role key used for a modifier is quickly followed by another keys, it is interpreted as held even before the tapping term elapsed. This is a problem if a key is used for example inside a rolling combo because the second key will be pressed before the first key is released.
|
||||||
|
|
||||||
|
For example, when trying to type the rolling combo "zx" and z being configured to send Ctrl when hold, z rapidly followed by x actually sends Ctrl-x. That's bad.
|
||||||
|
|
||||||
|
You can disable this behavior by defining `IGNORE_MOD_TAP_INTERRUPT` in `config.h`.
|
||||||
|
|
||||||
|
Note that this only concerns modifiers and not layer switching keys.
|
||||||
|
|
||||||
|
# Hold after tap
|
||||||
|
|
||||||
|
When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key. If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
- SHFT_T(KC_A) Down
|
||||||
|
- SHFT_T(KC_A) Up
|
||||||
|
- SHFT_T(KC_A) Down
|
||||||
|
- wait more than tapping term...
|
||||||
|
- SHFT_T(KC_A) Up
|
||||||
|
|
||||||
|
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
|
||||||
|
|
||||||
|
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
||||||
|
|
||||||
|
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
||||||
@@ -119,6 +119,7 @@ A similar function works in the keymap as `rgb_matrix_indicators_user`.
|
|||||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||||
#define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
|
#define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
|
||||||
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
|
|
||||||
## EEPROM storage
|
## EEPROM storage
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
|||||||
brew tap osx-cross/avr
|
brew tap osx-cross/avr
|
||||||
brew tap PX4/homebrew-px4
|
brew tap PX4/homebrew-px4
|
||||||
brew update
|
brew update
|
||||||
brew install avr-gcc
|
brew install avr-gcc@7
|
||||||
brew install dfu-programmer
|
brew install dfu-programmer
|
||||||
brew install gcc-arm-none-eabi
|
brew install gcc-arm-none-eabi
|
||||||
brew install avrdude
|
brew install avrdude
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
|||||||
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|
||||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|
||||||
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|
||||||
|
|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject (macOS) |
|
||||||
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|
||||||
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|
||||||
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ Windows and macOS use different keycodes for "next track" and "previous track".
|
|||||||
|`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track |
|
|`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track |
|
||||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track |
|
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track |
|
||||||
|`KC_MEDIA_SELECT` |`KC_MSEL`| |
|
|`KC_MEDIA_SELECT` |`KC_MSEL`| |
|
||||||
|
|`KC_MEDIA_EJECT` |`KC_EJCT`|Eject (macOS) |
|
||||||
|
|
||||||
## Number Pad
|
## Number Pad
|
||||||
|
|
||||||
|
|||||||
+149
-80
@@ -6,6 +6,7 @@
|
|||||||
#include <util/twi.h>
|
#include <util/twi.h>
|
||||||
|
|
||||||
#include "i2c_master.h"
|
#include "i2c_master.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
#define F_SCL 400000UL // SCL frequency
|
#define F_SCL 400000UL // SCL frequency
|
||||||
#define Prescaler 1
|
#define Prescaler 1
|
||||||
@@ -13,137 +14,205 @@
|
|||||||
|
|
||||||
void i2c_init(void)
|
void i2c_init(void)
|
||||||
{
|
{
|
||||||
|
TWSR = 0; /* no prescaler */
|
||||||
TWBR = (uint8_t)TWBR_val;
|
TWBR = (uint8_t)TWBR_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t i2c_start(uint8_t address)
|
i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
|
||||||
{
|
{
|
||||||
// reset TWI control register
|
// reset TWI control register
|
||||||
TWCR = 0;
|
TWCR = 0;
|
||||||
// transmit START condition
|
// transmit START condition
|
||||||
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
||||||
// wait for end of transmission
|
|
||||||
while( !(TWCR & (1<<TWINT)) );
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while( !(TWCR & (1<<TWINT)) ) {
|
||||||
|
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
|
||||||
|
return I2C_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check if the start condition was successfully transmitted
|
// check if the start condition was successfully transmitted
|
||||||
if((TWSR & 0xF8) != TW_START){ return 1; }
|
if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; }
|
||||||
|
|
||||||
// load slave address into data register
|
// load slave address into data register
|
||||||
TWDR = address;
|
TWDR = address;
|
||||||
// start transmission of address
|
// start transmission of address
|
||||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
// wait for end of transmission
|
|
||||||
while( !(TWCR & (1<<TWINT)) );
|
timeout_timer = timer_read();
|
||||||
|
while( !(TWCR & (1<<TWINT)) ) {
|
||||||
|
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
|
||||||
|
return I2C_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check if the device has acknowledged the READ / WRITE mode
|
// check if the device has acknowledged the READ / WRITE mode
|
||||||
uint8_t twst = TW_STATUS & 0xF8;
|
uint8_t twst = TW_STATUS & 0xF8;
|
||||||
if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1;
|
if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR;
|
||||||
|
|
||||||
return 0;
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t i2c_write(uint8_t data)
|
i2c_status_t i2c_write(uint8_t data, uint16_t timeout)
|
||||||
{
|
{
|
||||||
// load data into data register
|
// load data into data register
|
||||||
TWDR = data;
|
TWDR = data;
|
||||||
// start transmission of data
|
// start transmission of data
|
||||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
// wait for end of transmission
|
|
||||||
while( !(TWCR & (1<<TWINT)) );
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while( !(TWCR & (1<<TWINT)) ) {
|
||||||
if( (TWSR & 0xF8) != TW_MT_DATA_ACK ){ return 1; }
|
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
|
||||||
|
return I2C_STATUS_TIMEOUT;
|
||||||
return 0;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; }
|
||||||
|
|
||||||
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t i2c_read_ack(void)
|
int16_t i2c_read_ack(uint16_t timeout)
|
||||||
{
|
{
|
||||||
|
|
||||||
// start TWI module and acknowledge data after reception
|
// start TWI module and acknowledge data after reception
|
||||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
|
||||||
// wait for end of transmission
|
|
||||||
while( !(TWCR & (1<<TWINT)) );
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while( !(TWCR & (1<<TWINT)) ) {
|
||||||
|
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
|
||||||
|
return I2C_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// return received data from TWDR
|
// return received data from TWDR
|
||||||
return TWDR;
|
return TWDR;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t i2c_read_nack(void)
|
int16_t i2c_read_nack(uint16_t timeout)
|
||||||
{
|
{
|
||||||
|
|
||||||
// start receiving without acknowledging reception
|
// start receiving without acknowledging reception
|
||||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||||
// wait for end of transmission
|
|
||||||
while( !(TWCR & (1<<TWINT)) );
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while( !(TWCR & (1<<TWINT)) ) {
|
||||||
|
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
|
||||||
|
return I2C_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// return received data from TWDR
|
// return received data from TWDR
|
||||||
return TWDR;
|
return TWDR;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length)
|
i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||||
{
|
{
|
||||||
if (i2c_start(address | I2C_WRITE)) return 1;
|
i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
|
||||||
|
if (status) return status;
|
||||||
for (uint16_t i = 0; i < length; i++)
|
|
||||||
{
|
|
||||||
if (i2c_write(data[i])) return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
i2c_stop();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length)
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
{
|
status = i2c_write(data[i], timeout);
|
||||||
if (i2c_start(address | I2C_READ)) return 1;
|
if (status) return status;
|
||||||
|
|
||||||
for (uint16_t i = 0; i < (length-1); i++)
|
|
||||||
{
|
|
||||||
data[i] = i2c_read_ack();
|
|
||||||
}
|
|
||||||
data[(length-1)] = i2c_read_nack();
|
|
||||||
|
|
||||||
i2c_stop();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length)
|
|
||||||
{
|
|
||||||
if (i2c_start(devaddr | 0x00)) return 1;
|
|
||||||
|
|
||||||
i2c_write(regaddr);
|
|
||||||
|
|
||||||
for (uint16_t i = 0; i < length; i++)
|
|
||||||
{
|
|
||||||
if (i2c_write(data[i])) return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_stop();
|
status = i2c_stop(timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
return 0;
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length)
|
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||||
{
|
{
|
||||||
if (i2c_start(devaddr)) return 1;
|
i2c_status_t status = i2c_start(address | I2C_READ, timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
i2c_write(regaddr);
|
for (uint16_t i = 0; i < (length-1); i++) {
|
||||||
|
status = i2c_read_ack(timeout);
|
||||||
if (i2c_start(devaddr | 0x01)) return 1;
|
if (status >= 0) {
|
||||||
|
data[i] = status;
|
||||||
for (uint16_t i = 0; i < (length-1); i++)
|
} else {
|
||||||
{
|
return status;
|
||||||
data[i] = i2c_read_ack();
|
}
|
||||||
}
|
}
|
||||||
data[(length-1)] = i2c_read_nack();
|
|
||||||
|
|
||||||
i2c_stop();
|
status = i2c_read_nack(timeout);
|
||||||
|
if (status >= 0 ) {
|
||||||
|
data[(length-1)] = status;
|
||||||
|
} else {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
status = i2c_stop(timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void i2c_stop(void)
|
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||||
|
{
|
||||||
|
i2c_status_t status = i2c_start(devaddr | 0x00, timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
status = i2c_write(regaddr, timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
|
status = i2c_write(data[i], timeout);
|
||||||
|
if (status) return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = i2c_stop(timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
return I2C_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||||
|
{
|
||||||
|
i2c_status_t status = i2c_start(devaddr, timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
status = i2c_write(regaddr, timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
status = i2c_start(devaddr | 0x01, timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
for (uint16_t i = 0; i < (length-1); i++) {
|
||||||
|
status = i2c_read_ack(timeout);
|
||||||
|
if (status >= 0) {
|
||||||
|
data[i] = status;
|
||||||
|
} else {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
status = i2c_read_nack(timeout);
|
||||||
|
if (status >= 0 ) {
|
||||||
|
data[(length-1)] = status;
|
||||||
|
} else {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = i2c_stop(timeout);
|
||||||
|
if (status) return status;
|
||||||
|
|
||||||
|
return I2C_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
i2c_status_t i2c_stop(uint16_t timeout)
|
||||||
{
|
{
|
||||||
// transmit STOP condition
|
// transmit STOP condition
|
||||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||||
|
|
||||||
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while(TWCR & (1<<TWSTO)) {
|
||||||
|
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
|
||||||
|
return I2C_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -8,15 +8,24 @@
|
|||||||
#define I2C_READ 0x01
|
#define I2C_READ 0x01
|
||||||
#define I2C_WRITE 0x00
|
#define I2C_WRITE 0x00
|
||||||
|
|
||||||
|
typedef int16_t i2c_status_t;
|
||||||
|
|
||||||
|
#define I2C_STATUS_SUCCESS (0)
|
||||||
|
#define I2C_STATUS_ERROR (-1)
|
||||||
|
#define I2C_STATUS_TIMEOUT (-2)
|
||||||
|
|
||||||
|
#define I2C_TIMEOUT_IMMEDIATE (0)
|
||||||
|
#define I2C_TIMEOUT_INFINITE (0xFFFF)
|
||||||
|
|
||||||
void i2c_init(void);
|
void i2c_init(void);
|
||||||
uint8_t i2c_start(uint8_t address);
|
i2c_status_t i2c_start(uint8_t address, uint16_t timeout);
|
||||||
uint8_t i2c_write(uint8_t data);
|
i2c_status_t i2c_write(uint8_t data, uint16_t timeout);
|
||||||
uint8_t i2c_read_ack(void);
|
int16_t i2c_read_ack(uint16_t timeout);
|
||||||
uint8_t i2c_read_nack(void);
|
int16_t i2c_read_nack(uint16_t timeout);
|
||||||
uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length);
|
i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||||
uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length);
|
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||||
uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length);
|
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||||
uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length);
|
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||||
void i2c_stop(void);
|
i2c_status_t i2c_stop(uint16_t timeout);
|
||||||
|
|
||||||
#endif // I2C_MASTER_H
|
#endif // I2C_MASTER_H
|
||||||
@@ -49,6 +49,14 @@
|
|||||||
#define ISSI_COMMANDREGISTER 0xFD
|
#define ISSI_COMMANDREGISTER 0xFD
|
||||||
#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
|
#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
|
||||||
|
|
||||||
|
#ifndef ISSI_TIMEOUT
|
||||||
|
#define ISSI_TIMEOUT 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ISSI_PERSISTENCE
|
||||||
|
#define ISSI_PERSISTENCE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// Transfer buffer for TWITransmitData()
|
// Transfer buffer for TWITransmitData()
|
||||||
uint8_t g_twi_transfer_buffer[20];
|
uint8_t g_twi_transfer_buffer[20];
|
||||||
|
|
||||||
@@ -83,8 +91,14 @@ void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
|||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
|
|
||||||
//Transmit data until succesful
|
#if ISSI_PERSISTENCE > 0
|
||||||
while(i2c_transmit(addr << 1, g_twi_transfer_buffer,2) != 0);
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
||||||
@@ -95,20 +109,24 @@ void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
// g_twi_transfer_buffer[] is 20 bytes
|
// g_twi_transfer_buffer[] is 20 bytes
|
||||||
|
|
||||||
// iterate over the pwm_buffer contents at 16 byte intervals
|
// iterate over the pwm_buffer contents at 16 byte intervals
|
||||||
for ( int i = 0; i < 144; i += 16 )
|
for ( int i = 0; i < 144; i += 16 ) {
|
||||||
{
|
|
||||||
// set the first register, e.g. 0x24, 0x34, 0x44, etc.
|
// set the first register, e.g. 0x24, 0x34, 0x44, etc.
|
||||||
g_twi_transfer_buffer[0] = 0x24 + i;
|
g_twi_transfer_buffer[0] = 0x24 + i;
|
||||||
// copy the data from i to i+15
|
// copy the data from i to i+15
|
||||||
// device will auto-increment register for data after the first byte
|
// device will auto-increment register for data after the first byte
|
||||||
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
|
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
|
||||||
for ( int j = 0; j < 16; j++ )
|
for ( int j = 0; j < 16; j++ ) {
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
|
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Transmit buffer until succesful
|
#if ISSI_PERSISTENCE > 0
|
||||||
while(i2c_transmit(addr << 1, g_twi_transfer_buffer,17) != 0);
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,6 +183,7 @@ void IS31FL3731_init( uint8_t addr )
|
|||||||
// most usage after initialization is just writing PWM buffers in bank 0
|
// most usage after initialization is just writing PWM buffers in bank 0
|
||||||
// as there's not much point in double-buffering
|
// as there's not much point in double-buffering
|
||||||
IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 );
|
IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
||||||
@@ -217,7 +236,6 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
|
|
||||||
g_led_control_registers_update_required = true;
|
g_led_control_registers_update_required = true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "al1.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
CONFIG_LED_IO;
|
||||||
|
print_dec(usb_led);
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
PORTB &= ~(1<<7);
|
||||||
|
else
|
||||||
|
PORTB |= (1<<7);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
PORTD &= ~(1<<0);
|
||||||
|
else
|
||||||
|
PORTD |= (1<<0);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
PORTD &= ~(1<<1);
|
||||||
|
else
|
||||||
|
PORTD |= (1<<1);
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef AL1_H
|
||||||
|
#define AL1_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define CONFIG_LED_IO \
|
||||||
|
DDRB |= (1<<7) | (1<<6); \
|
||||||
|
DDRD |= (1<<0) | (1<<1);
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\
|
||||||
|
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
|
||||||
|
K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||||
|
K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
|
||||||
|
{ K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_split_bs( \
|
||||||
|
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K512, K012, K013, K014, K015, K415, K414, \
|
||||||
|
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
|
||||||
|
K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||||
|
K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
|
||||||
|
{ K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K512, KC_NO, KC_NO, KC_NO} \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 MechMerlin
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6050
|
||||||
|
#define DEVICE_VER 0x0104
|
||||||
|
#define MANUFACTURER Alsoran
|
||||||
|
#define PRODUCT AL1
|
||||||
|
#define DESCRIPTION A custom keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 7
|
||||||
|
#define MATRIX_COLS 20
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "AL1",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 20.5,
|
||||||
|
"height": 5.25,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":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":"Insert", "x":15.25, "y":0}, {"label":"Num Lock", "x":16.5, "y":0}, {"label":"/", "x":17.5, "y":0}, {"label":"*", "x":18.5, "y":0}, {"label":"-", "x":19.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"7", "x":16.5, "y":1}, {"label":"8", "x":17.5, "y":1}, {"label":"9", "x":18.5, "y":1}, {"label":"+", "x":19.5, "y":1, "h":2}, {"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":"4", "x":16.5, "y":2}, {"label":"5", "x":17.5, "y":2}, {"label":"6", "x":18.5, "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}, {"x":14, "y":3}, {"label":"1", "x":16.5, "y":3}, {"label":"2", "x":17.5, "y":3}, {"label":"3", "x":18.5, "y":3}, {"label":"Enter", "x":19.5, "y":3, "h":2}, {"label":"\u2191", "x":15.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":7}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4}, {"label":"Menu", "x":12.75, "y":4, "w":1.25}, {"label":"0", "x":17.5, "y":4}, {"label":".", "x":18.5, "y":4}, {"label":"\u2190", "x":14.25, "y":4.25}, {"label":"\u2193", "x":15.25, "y":4.25}, {"label":"\u2192", "x":16.25, "y":4.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_split_bs": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Num Lock", "x":16.5, "y":0}, {"label":"/", "x":17.5, "y":0}, {"label":"*", "x":18.5, "y":0}, {"label":"-", "x":19.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"7", "x":16.5, "y":1}, {"label":"8", "x":17.5, "y":1}, {"label":"9", "x":18.5, "y":1}, {"label":"+", "x":19.5, "y":1, "h":2}, {"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":"4", "x":16.5, "y":2}, {"label":"5", "x":17.5, "y":2}, {"label":"6", "x":18.5, "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}, {"x":14, "y":3}, {"label":"1", "x":16.5, "y":3}, {"label":"2", "x":17.5, "y":3}, {"label":"3", "x":18.5, "y":3}, {"label":"Enter", "x":19.5, "y":3, "h":2}, {"label":"\u2191", "x":15.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":7}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4}, {"label":"Menu", "x":12.75, "y":4, "w":1.25}, {"label":"0", "x":17.5, "y":4}, {"label":".", "x":18.5, "y":4}, {"label":"\u2190", "x":14.25, "y":4.25}, {"label":"\u2193", "x":15.25, "y":4.25}, {"label":"\u2192", "x":16.25, "y":4.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(\
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ),
|
||||||
|
|
||||||
|
[1] = LAYOUT(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_FN1, KC_FN2, KC_FN3, KC_P0, KC_PDOT ),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for al1
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
#include "al1.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_split_bs(\
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRAVE, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ),
|
||||||
|
[1] = LAYOUT_split_bs(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRAVE, KC_DELETE, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_FN1, KC_FN2, KC_FN3, KC_P0, KC_PDOT ),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||||
|
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static uint8_t read_rows(void);
|
||||||
|
static void init_rows(void);
|
||||||
|
static void unselect_cols(void);
|
||||||
|
static void select_col(uint8_t col);
|
||||||
|
|
||||||
|
inline uint8_t matrix_rows(void) {
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline uint8_t matrix_cols(void) {
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
// initialize row and col
|
||||||
|
unselect_cols();
|
||||||
|
init_rows();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = 0;
|
||||||
|
matrix_debouncing[i] = 0;
|
||||||
|
}
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_col(col);
|
||||||
|
_delay_us(3);
|
||||||
|
uint8_t rows = read_rows();
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = rows & (1<<row);
|
||||||
|
if (prev_bit != curr_bit) {
|
||||||
|
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||||
|
debouncing = DEBOUNCING_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unselect_cols();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing) {
|
||||||
|
_delay_ms(1);
|
||||||
|
} else {
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void) {
|
||||||
|
if (debouncing)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool matrix_is_on(uint8_t row, uint8_t col) {
|
||||||
|
return (matrix[row] & ((matrix_row_t)1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
print("\nr/c 0123456789ABCDEF\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void) {
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop32(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row pin configuration
|
||||||
|
*
|
||||||
|
* row: 0 1 2 3 4 5
|
||||||
|
* pin: C7 B1 B2 C6 B4 B5
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static void init_rows(void)
|
||||||
|
{
|
||||||
|
DDRC &= ~0b11000000;
|
||||||
|
DDRB &= ~0b00110110;
|
||||||
|
PORTC |= 0b11000000;
|
||||||
|
PORTB |= 0b00110110;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint8_t read_rows(void) {
|
||||||
|
return (PINC&(1<<PC7) ? 0 : (1<<0)) |
|
||||||
|
(PINB&(1<<PB1) ? 0 : (1<<1)) |
|
||||||
|
(PINB&(1<<PB2) ? 0 : (1<<2)) |
|
||||||
|
(PINC&(1<<PC6) ? 0 : (1<<3)) |
|
||||||
|
(PINB&(1<<PB4) ? 0 : (1<<4)) |
|
||||||
|
(PINB&(1<<PB5) ? 0 : (1<<5));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row pin configuration
|
||||||
|
* pin: D3 D7 D6 D5 D4
|
||||||
|
* row: off 0 x x x x
|
||||||
|
* 0 1 0 0 0 0
|
||||||
|
* 1 1 0 0 0 1
|
||||||
|
* 2 1 0 0 1 0
|
||||||
|
* 3 1 0 0 1 1
|
||||||
|
* 4 1 0 1 0 0
|
||||||
|
* 5 1 0 1 0 1
|
||||||
|
* 6 1 0 1 1 0
|
||||||
|
* 7 1 0 1 1 1
|
||||||
|
* 8 1 1 0 0 0
|
||||||
|
* 9 1 1 0 0 1
|
||||||
|
* 10 1 1 0 1 0
|
||||||
|
* 11 1 1 0 1 1
|
||||||
|
* 12 1 1 1 0 0
|
||||||
|
* 13 1 1 1 0 1
|
||||||
|
* 14 1 1 1 1 0
|
||||||
|
* 15 1 1 1 1 1
|
||||||
|
*/
|
||||||
|
static void unselect_cols(void)
|
||||||
|
{
|
||||||
|
// output high(DDR:1, PORT:1) to unselect
|
||||||
|
DDRB |= (1 << PD3);
|
||||||
|
PORTB |= (1 << PD3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
DDRD |= (1<<PD3 | 1<<PD4 | 1<<PD5 | 1<<PD6 | 1<<PD7);
|
||||||
|
|
||||||
|
PORTD &= ~(1<<PD3);
|
||||||
|
|
||||||
|
if (col & (1<<0)) {
|
||||||
|
PORTD |= (1<<PD4);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PORTD &= ~(1<<PD4);
|
||||||
|
}
|
||||||
|
if (col & (1<<1)) {
|
||||||
|
PORTD |= (1<<PD5);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PORTD &= ~(1<<PD5);
|
||||||
|
}
|
||||||
|
if (col & (1<<2)) {
|
||||||
|
PORTD |= (1<<PD6);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PORTD &= ~(1<<PD6);
|
||||||
|
}
|
||||||
|
if (col & (1<<3)) {
|
||||||
|
PORTD |= (1<<PD7);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PORTD &= ~(1<<PD7);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# TriangleLabs AL1
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Olivia](https://github.com/olivia)
|
||||||
|
Hardware Supported: AL1 PCB
|
||||||
|
Hardware Availability: [GroupBuy](https://geekhack.org/index.php?topic=93258.0)
|
||||||
|
|
||||||
|
Ported from [TriangleLab](https://github.com/TriangleLab)'s repo: https://github.com/TriangleLab/AL1-Firmware/tree/master/keyboards/al1
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make al1:default
|
||||||
|
make al1:splitbs
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += matrix.c
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#define PERMISSIVE_HOLD
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
# Overview
|
||||||
|
|
||||||
|
A Balance 12 layout for the Atreus keyboard.
|
||||||
|
|
||||||
|
Balance 12 was created by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
|
||||||
|
for some background on the design of the layout.
|
||||||
|
|
||||||
|
* The variant used here is a mirror of the original for left-handers
|
||||||
|
* The central column of punctuation keys has been moved elsewhere
|
||||||
|
* Home positions for the left and right forefingers are *T* and *A* respectively
|
||||||
|
|
||||||
|
## To build/flash
|
||||||
|
|
||||||
|
> make atreus:yttyx:avrdude
|
||||||
|
|
||||||
|
## Layers
|
||||||
|
|
||||||
|
### Base:
|
||||||
|
|
||||||
|
.----------------------------------. .------------------------------.
|
||||||
|
| P | L | C | D | W | | U | O | Y | K | Q |
|
||||||
|
+------+------+------+-----+-------| |------+-----+-----+-----+-----|
|
||||||
|
| N | R | S | T | M | | A | E | I | H | V |
|
||||||
|
+------+------+------+-----+-------| |------+-----+-----+-----+-----|
|
||||||
|
| Z | J | F | G | B | | , | . | ; | X | - |
|
||||||
|
+------+------+------+-----+-------+---------+------+-----+-----+-----+-----|
|
||||||
|
| Shft | Ctl | Alt | BS | Space | L1 | R1 | Shft | R2 | Win | Ctl | Alt |
|
||||||
|
'---------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
### L1:
|
||||||
|
|
||||||
|
.---------------------------------. .--------------------------------.
|
||||||
|
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
||||||
|
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||||
|
| Tab | ? | = | - | _ | | ' | " | + | * | Enter |
|
||||||
|
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||||
|
| Esc | ! | & | | | | , | . | ; | | - |
|
||||||
|
|------+------+------+----+-------+---------+------+----+-----+------+-------|
|
||||||
|
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||||
|
'----------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
### R1:
|
||||||
|
|
||||||
|
.---------------------------------. .-------------------------------.
|
||||||
|
| < | > | { | } | @ | | $ | £ | | | R3 |
|
||||||
|
+------+------+-----+-----|-------| |------+----+-----+------+------|
|
||||||
|
| [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
|
||||||
|
|------+------+-----+-----+-------| |------+----+-----+------+------|
|
||||||
|
| / | \ | ^ | | | % | | , | . | ; | | PScn |
|
||||||
|
|------+------+-----+-----+-------+---------+------+----+-----+------+------|
|
||||||
|
| Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||||
|
'---------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
### R2:
|
||||||
|
|
||||||
|
.-----------------------------------. .--------------------.-----------------.
|
||||||
|
| F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
|
||||||
|
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||||
|
| F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
|
||||||
|
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||||
|
| F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
|
||||||
|
|------+------+------+------+-------+---------+------+------+------+------+----------|
|
||||||
|
| Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
|
||||||
|
'------------------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
### R3:
|
||||||
|
|
||||||
|
.----------------------------. .------------------------.
|
||||||
|
| RESET | | | | | | | | | | R3 |
|
||||||
|
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
|-------+----+-----+----+----+---------+----+----+----+----+----|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
'---------------------------------------------------------------'
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#define ONESHOT_TIMEOUT 500 // Time (in ms) before the one shot key is released
|
||||||
|
|
||||||
|
// Disable some options to reduce firmware size
|
||||||
|
#define NO_PRINT
|
||||||
|
#define NO_ACTION_TAPPING
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
BASE, // Balance Twelve
|
||||||
|
L1, // (momentary)
|
||||||
|
R1, // (momentary)
|
||||||
|
R2, // (momentary)
|
||||||
|
R3 // (momentary)
|
||||||
|
};
|
||||||
|
|
||||||
|
#define xxxxxxx KC_NO
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
// Aliases from replicaJunction's atreus layout
|
||||||
|
#define KCX_LST LSFT(KC_TAB)
|
||||||
|
#define KX_COPY LCTL(KC_C)
|
||||||
|
#define KX_CUT LCTL(KC_X)
|
||||||
|
#define KX_PAST LCTL(KC_V)
|
||||||
|
#define KX_UNDO LCTL(KC_Z)
|
||||||
|
|
||||||
|
#define KX_AT LSFT(KC_QUOT)
|
||||||
|
#define KX_PIPE LSFT(KC_NUBS)
|
||||||
|
#define KX_WINR LSFT(LGUI(KC_RGHT)) // Move window to next monitor (Windows)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = {
|
||||||
|
|
||||||
|
/* Balance Twelve mirror variant (left-handed)
|
||||||
|
.--------------------------------. .------------------------------.
|
||||||
|
| P | L | C | D | W | | U | O | Y | K | Q |
|
||||||
|
+------+------+-----+----+-------| |------+----+-----+------+-----|
|
||||||
|
| N | R | S | T | M | | A | E | I | H | V |
|
||||||
|
+------+------+-----+----+-------| |------+----+-----+------+-----|
|
||||||
|
| Z | J | F | G | B | | , | . | ; | X | - |
|
||||||
|
+------+------+-----+----+-------+---------+------+----+-----+------+-----|
|
||||||
|
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Win | Ctrl | Alt |
|
||||||
|
'-------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[BASE] = LAYOUT(
|
||||||
|
KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q,
|
||||||
|
KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V,
|
||||||
|
KC_Z, KC_J, KC_F, KC_G, KC_B, KC_COMM, KC_DOT, KC_SCLN, KC_X, KC_MINS,
|
||||||
|
KC_LSFT, KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, MO(L1), MO(R1), OSM(MOD_LSFT), MO(R2), KC_LWIN, KC_RCTL, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* L1
|
||||||
|
.---------------------------------. .--------------------------------.
|
||||||
|
| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
||||||
|
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||||
|
| Tab | ? | = | - | _ | | ' | " | + | * | Enter |
|
||||||
|
|------+------+------+----+-------| |------+----+-----+------+-------|
|
||||||
|
| Esc | ! | & | | | | , | . | ; | | - |
|
||||||
|
|------+------+------+----+-------+---------+------+----+-----+------+-------|
|
||||||
|
| Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||||
|
'----------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[L1] = LAYOUT(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||||
|
KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT,
|
||||||
|
KC_ESC, KC_EXLM, KC_AMPR, xxxxxxx, xxxxxxx, _______, _______, _______, xxxxxxx, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* R1
|
||||||
|
.---------------------------------. .-------------------------------.
|
||||||
|
| < | > | { | } | @ | | $ | £ | | | R3 |
|
||||||
|
+------+------+-----+-----|-------| |------+----+-----+------+------|
|
||||||
|
| [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
|
||||||
|
|------+------+-----+-----+-------| |------+----+-----+------+------|
|
||||||
|
| / | \ | ^ | | | % | | , | . | ; | | PScn |
|
||||||
|
|------+------+-----+-----+-------+---------+------+----+-----+------+------|
|
||||||
|
| Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
|
||||||
|
'---------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[R1] = LAYOUT(
|
||||||
|
KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, xxxxxxx, xxxxxxx, MO(R3),
|
||||||
|
KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS,
|
||||||
|
KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, xxxxxxx, KC_PSCR,
|
||||||
|
_______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* R2
|
||||||
|
.-----------------------------------. .--------------------.-----------------.
|
||||||
|
| F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
|
||||||
|
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||||
|
| F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
|
||||||
|
|------+------+------+------+-------| |------+------+------+------+----------|
|
||||||
|
| F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
|
||||||
|
|------+------+------+------+-------+---------+------+------+------+------+----------|
|
||||||
|
| Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
|
||||||
|
'------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[R2] = LAYOUT(
|
||||||
|
KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS,
|
||||||
|
KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT,
|
||||||
|
KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, xxxxxxx, KC_TAB, xxxxxxx, xxxxxxx,
|
||||||
|
_______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR
|
||||||
|
),
|
||||||
|
|
||||||
|
/* R3
|
||||||
|
.----------------------------. .------------------------.
|
||||||
|
| RESET | | | | | | | | | | R3 |
|
||||||
|
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
|-------+----+-----+----+----| |----+----+----+----+----|
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
|-------+----+-----+----+----+---------+----+----+----+----+----|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
'---------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[R3] = LAYOUT(
|
||||||
|
RESET, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, _______,
|
||||||
|
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,
|
||||||
|
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,
|
||||||
|
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#include "../config.h"
|
||||||
|
|
||||||
|
#define TAPPING_TERM 600 // ms
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "cod67.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef COD67_H
|
||||||
|
#define COD67_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 MechMerlin
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Gray
|
||||||
|
#define PRODUCT cod67
|
||||||
|
#define DESCRIPTION 60% Custom Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 }
|
||||||
|
#define MATRIX_COL_PINS { D7, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN D4
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "COD67",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4}, {"label":"Win", "x":1, "y":4}, {"label":"Alt", "x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4, "w":2}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/* Copyright 2018 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for cod67
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Gray COD67
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port.
|
||||||
|
|
||||||
|
There were only 75 units made worldwide.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
|
Hardware Supported: Gray COD67
|
||||||
|
Hardware Availability: [Zfrontier](https://en.zfrontier.com/products/cod67)
|
||||||
|
|
||||||
|
At this time, flashing ONLY works on Windows systems.
|
||||||
|
|
||||||
|
To put in bootloader mode, hold the `Esc` key while plugging in the USB cable.
|
||||||
|
|
||||||
|
The COD67 will show up as a drive.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make cod67:default:bin
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
|
|
||||||
|
Rename the resulting `.bin` file to `cod67.bin`.
|
||||||
|
|
||||||
|
Drag and drop `cod67.bin` to the drive, overwriting the previous `cod67.bin` stored on it.
|
||||||
|
|
||||||
|
Press the `Esc` key again to reset the board. You are now ready to type!
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
The backlight pin is attached to a non PWM pin `D4` so backlight is only on/off.
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#define RGB_DI_PIN F7 // pin the DI on the WS2812B is hooked-up to
|
||||||
|
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
||||||
|
#define RGBLED_NUM 12 // number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
||||||
|
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
||||||
|
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "contra.h"
|
||||||
|
#include "keymap_german.h"
|
||||||
|
|
||||||
|
enum contra_layers {
|
||||||
|
_QWERTZ,
|
||||||
|
_FUNC,
|
||||||
|
_NUMPAD,
|
||||||
|
_NUMROW
|
||||||
|
};
|
||||||
|
|
||||||
|
#define FUN MO(_FUNC)
|
||||||
|
#define NPK TT(_NUMPAD)
|
||||||
|
//#define SPEC_S LM(_NUMROW, (KC_LSFT))
|
||||||
|
//#define SPEC_L3 LM(_NUMROW, (DE_ALGR))
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
SPEC_S = SAFE_RANGE,
|
||||||
|
SPEC_L3
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwertz
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | +* ~ | Enter|
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Sup | Alt | NumP | Spec | Space | Sp_A | Fun | Left | Down | Right|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTZ] = {
|
||||||
|
{KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
|
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT },
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT},
|
||||||
|
{KC_LCTL, KC_LGUI, KC_LALT, NPK, SPEC_S, KC_SPC, KC_SPC, SPEC_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Function layer
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | Ü | | Ö | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Lock | Ä | | | | | | RGBS | RGBB | RGBS | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | ---- | ---- | | | ---- | ---- | Home | PgDn | End |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUNC] = {
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
|
||||||
|
{KC_LOCK, DE_AE, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
|
||||||
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Numrow layer (special characters with Shift and ISO_L3_Shift)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | ><| | | | | | | | | | _ - | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | ---- | ---- | | | ---- | ---- | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NUMROW] = {
|
||||||
|
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
|
||||||
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Numpad layer
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | + | 7 | 8 | 9 | | | | | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | - | 4 | 5 | 6 | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | * | 1 | 2 | 3 | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | / | 0 | ---- | ---- | | | ---- | ---- | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NUMPAD] = {
|
||||||
|
{DEBUG, KC_PPLS, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, KC_PMNS, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, KC_PAST, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, KC_PSLS, KC_P0, _______, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case SPEC_S:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
layer_on(_NUMROW);
|
||||||
|
} else {
|
||||||
|
layer_off(_NUMROW);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case SPEC_L3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(DE_ALGR);
|
||||||
|
layer_on(_NUMROW);
|
||||||
|
} else {
|
||||||
|
layer_off(_NUMROW);
|
||||||
|
unregister_code(DE_ALGR);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
// Force-enable Numlock
|
||||||
|
if (!(usb_led & (1<<USB_LED_NUM_LOCK))) {
|
||||||
|
register_code(KC_NUMLOCK);
|
||||||
|
unregister_code(KC_NUMLOCK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Contra Layout by Maxr1998
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
|
|
||||||
|
### Debugging ###
|
||||||
|
#CONSOLE_ENABLE = yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -40,13 +40,13 @@
|
|||||||
*/
|
*/
|
||||||
// The first section contains all of the arguments
|
// The first section contains all of the arguments
|
||||||
// The second converts the arguments into a two-dimensional array
|
// The second converts the arguments into a two-dimensional array
|
||||||
#define KEYMAP( \
|
#define LAYOUT_ortho_6x4( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, k23, \
|
k20, k21, k22, k23, \
|
||||||
k30, k31, k32, k33, \
|
k30, k31, k32, k33, \
|
||||||
k40, k41, k42, k43, \
|
k40, k41, k42, k43, \
|
||||||
k50, k51, k52, k53 \
|
k50, k51, k52, k53 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{k00, k01, k02, k03}, \
|
{k00, k01, k02, k03}, \
|
||||||
@@ -54,14 +54,27 @@
|
|||||||
{k20, k21, k22, k23}, \
|
{k20, k21, k22, k23}, \
|
||||||
{k30, k31, k32, k33}, \
|
{k30, k31, k32, k33}, \
|
||||||
{k40, k41, k42, k43}, \
|
{k40, k41, k42, k43}, \
|
||||||
{k50, k51, k52, k53} \
|
{k50, k51, k52, k53} \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_numpad_6x4( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, \
|
||||||
|
k30, k31, k32, k23, \
|
||||||
|
k40, k41, k42, \
|
||||||
|
k50, k52, k43 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03}, \
|
||||||
|
{k10, k11, k12, k13}, \
|
||||||
|
{k20, k21, k22, k23}, \
|
||||||
|
{k30, k31, k32, KC_NO}, \
|
||||||
|
{k40, k41, k42, k43}, \
|
||||||
|
{k50, KC_NO, k52, KC_NO} \
|
||||||
}
|
}
|
||||||
void matrix_init_user(void);
|
void matrix_init_user(void);
|
||||||
void matrix_scan_user(void);
|
void matrix_scan_user(void);
|
||||||
/*
|
|
||||||
inline void cospad_bl_led_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }
|
|
||||||
inline void cospad_bl_led_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
|
||||||
*/
|
|
||||||
|
|
||||||
inline void cospad_bl_led_on(void) { PORTF &= ~(1<<7); }
|
inline void cospad_bl_led_on(void) { PORTF &= ~(1<<7); }
|
||||||
inline void cospad_bl_led_off(void) { PORTF |= (1<<7); }
|
inline void cospad_bl_led_off(void) { PORTF |= (1<<7); }
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 4,
|
||||||
|
"height": 6,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_numpad_6x4": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"Fn", "x":2, "y":0}, {"label":"Back", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"+", "x":3, "y":2, "h":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4, "h":2}, {"label":"0", "x":0, "y":5, "w":2}, {"label":".", "x":2, "y":5}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_ortho_6x4": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"Fn", "x":2, "y":0}, {"label":"Back", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"x":3, "y":3}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}, {"label":"0", "x":0, "y":5}, {"x":1, "y":5}, {"label":".", "x":2, "y":5}, {"x":3, "y":5}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "cospad.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
@@ -31,13 +31,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_BL] = KEYMAP(
|
[_BL] = LAYOUT_numpad_6x4(
|
||||||
KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \
|
KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \
|
||||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
KC_P7, KC_P8, KC_P9, \
|
||||||
KC_P4, KC_P5, KC_P6, KC_NO, \
|
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
KC_P1, KC_P2, KC_P3, \
|
||||||
KC_P0, KC_NO, KC_PDOT, KC_NO),
|
KC_P0, KC_PDOT, KC_PENT),
|
||||||
|
|
||||||
/* Keymap _FL: Function Layer
|
/* Keymap _FL: Function Layer
|
||||||
* ,-------------------.
|
* ,-------------------.
|
||||||
@@ -54,13 +54,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | 0 |RST | |
|
* | 0 |RST | |
|
||||||
* `-------------------'
|
* `-------------------'
|
||||||
*/
|
*/
|
||||||
[_FL] = KEYMAP(
|
[_FL] = LAYOUT_numpad_6x4(
|
||||||
RGB_TOG, KC_TAB, KC_TRNS, KC_BSPC, \
|
RGB_TOG, KC_TAB, KC_TRNS, KC_BSPC, \
|
||||||
RGB_MOD, RGB_M_P, BL_TOGG, KC_PMNS, \
|
RGB_MOD, RGB_M_P, BL_TOGG, KC_PMNS, \
|
||||||
RGB_HUD, RGB_HUI, BL_ON, KC_PPLS, \
|
RGB_HUD, RGB_HUI, BL_ON, \
|
||||||
RGB_SAD, RGB_SAI, BL_OFF, KC_NO, \
|
RGB_SAD, RGB_SAI, BL_OFF, KC_PPLS, \
|
||||||
RGB_VAD, RGB_VAI, KC_P3, KC_PENT, \
|
RGB_VAD, RGB_VAI, KC_P3, \
|
||||||
KC_P0, KC_NO, RESET, KC_NO),
|
KC_P0, RESET, KC_PENT),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,22 +10,53 @@ extern keymap_config_t keymap_config;
|
|||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KEYMAP_V2(
|
/* Layer 0: Default Layer
|
||||||
|
* ,---------------------------- ----------------------------------------.
|
||||||
|
* |Esc| F1| F2| F3| F4| F5| F6| |F7| F8| F9| F10| F11| F12|Prnt|Ins|Home|
|
||||||
|
* |---------------------------- ----------------------------------------|
|
||||||
|
* | `| 1| 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| \| Del| End|
|
||||||
|
* |-------------------------- ------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| | Y| U| I| O| P| [| ]| BkSp | PgUp|
|
||||||
|
* |-------------------------- ------------------------------------------|
|
||||||
|
* |Ctrl| A| S| D| F| G| | H| J| K| L| ;| '| Enter | PgDn|
|
||||||
|
* |---------------------------- -----------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| | N| M| ,| .| /| Shift | Up| FN1|
|
||||||
|
* |----------------------------- ----------------------------------------|
|
||||||
|
* |Ctrl |Gui |Alt |Space |FN1 | | Space | Alt| Gui| Ctrl| Lef | Dow |Rig|
|
||||||
|
* `---------------------------- ----------------------------------------'
|
||||||
|
*/
|
||||||
|
LAYOUT_v2(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_PAUSE, KC_HOME,
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_PAUSE, KC_HOME,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_END,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_END,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
|
||||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, //modify KC_TRNS to enable ISO Support
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, KC_ENT, KC_PGDN, //modify _______ to enable ISO Support
|
||||||
KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, MO(1), //modify KC_TRNS to enable ISO Support
|
KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, MO(1), //modify _______ to enable ISO Support
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
KEYMAP_V2(
|
/* Layer 1: FN1 Layer
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
* ,---------------------------- -------------------------------------.
|
||||||
KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
* | | | | | | | | | | | | | | | |Reset|
|
||||||
KC_CAPSLOCK, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
* |---------------------------- -------------------------------------|
|
||||||
M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS,
|
* | \ | | | | | | | | | | | | | | | |
|
||||||
KC_TRNS, KC_VOLD, KC_TRNS, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
|
* |---------------------------- ---------------------------------------|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
* |Caps|VolUp| Up | | | | | | | | | Up| | | |
|
||||||
|
* |--------------------------- ---------------------------------------|
|
||||||
|
* | |Lft|Dwn|Rig| | | | | | |Lft|Rig| | |
|
||||||
|
* |---------------------------- -------------------------------------|
|
||||||
|
* | |VolDn|Mute| | | | | | | |Dwn| | | |
|
||||||
|
* |---------------------------- ----------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `--------------------------- ----------------------------------------'
|
||||||
|
*/
|
||||||
|
LAYOUT_v2(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
|
KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_CAPSLOCK, KC_VOLU, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
|
||||||
|
M(1), KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#ifndef CONFIG_KEYMAP_H
|
||||||
|
#define CONFIG_KEYMAP_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// Fix KC_GESC conflict with Cmd+Alt+Esc on macos
|
||||||
|
#define GRAVE_ESC_GUI_OVERRIDE
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define ______ KC_TRNS
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _ML 2
|
||||||
|
|
||||||
|
enum my_keycodes {
|
||||||
|
BR_UP = SAFE_RANGE,
|
||||||
|
BR_DOWN
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | _FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / | _ML | Up |Shift|
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right|
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_2_shifts(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_ML), KC_UP, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
|
||||||
|
/* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | UP | | | | | Reset |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | Left| Down|Right| | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, KC_DEL,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, ______, ______, ______, RESET,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RIGHT, ______, ______, ______,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______),
|
||||||
|
|
||||||
|
/* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | | BR- | BR+ | F3 | F4 | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Eject |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ML] = LAYOUT(
|
||||||
|
______, BR_DOWN, BR_UP, ______, ______, KC_F5, KC_F6, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, ______, KC_MEDIA_EJECT,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
uint8_t key;
|
||||||
|
switch (keycode) {
|
||||||
|
case BR_DOWN:
|
||||||
|
case BR_UP:
|
||||||
|
// Clear the RGUI modifier placed by LM for _ML layer as brightness don't
|
||||||
|
// work with modifiers.
|
||||||
|
key = (keycode == BR_DOWN) ? KC_SLCK : KC_PAUS;
|
||||||
|
if (record->event.pressed) {
|
||||||
|
unregister_mods(MOD_RGUI);
|
||||||
|
add_key(key);
|
||||||
|
send_keyboard_report();
|
||||||
|
} else {
|
||||||
|
del_key(key);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
|
return false; // Skip all further processing of this key
|
||||||
|
default:
|
||||||
|
return true; // Process all other keycodes normally
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# Macos keymap with arrow
|
||||||
|
|
||||||
|
This is a keymap for DZ60 configured with arrows using the layout below:
|
||||||
|
|
||||||
|
[](http://www.keyboard-layout-editor.com/#/gists/07d924064c77c0ff43de6b8a9519f931)
|
||||||
|
|
||||||
|
My build used the following components:
|
||||||
|
* DZ60 PCB
|
||||||
|
* [Stainless steel alu plate option A with 2U left shift](https://www.aliexpress.com/item/Alu-plate-dz60-plate-for-DIY-mechanical-keyboard/32827595666.html) (optional)
|
||||||
|
* [YMDK customized 61 64 68 ANSI keyset](https://www.amazon.com/Customized-Keyset-Profile-Mechanical-Keyboard/dp/B0777LMKKK)
|
||||||
|
* 60 Cherry MX Clear for the main keys + 10 Cherry MX Grey for the large keys
|
||||||
|
* [The wood case for DZ60](https://www.aliexpress.com/item/GH60-Keyboard-Wood-Case-PCB-Board-Position-Plate-Satellite-Axis-And-Walnut-Wood-Wrist-Rest-For/32836566852.html) (optional)
|
||||||
|
|
||||||
|
## Base Layer
|
||||||
|
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| _FL | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | / | _ML | Up |Shift|
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| Ctrl | Alt | Cmd | Space |Cmd/_ML| Alt | Left| Down|Right|
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
* The escape key use `KC_GESC` to get grave accent on any letter with ``Alt+Esc`` and `` ` `` alone with the ``Hyper+Esc``. The `~` is obtained with `Shift+Esc`. `GRAVE_ESC_GUI_OVERRIDE` is define so `Cmd+Alt+Esc` can still work.
|
||||||
|
* The `Caps-Lock` (`Hyper`) key switch to the function layer (`_FL`).
|
||||||
|
* The right `Cmd` key is used to switch to the media layer (`_ML`) when used with keys mapped on that layer (the top row). Any other keys just act as a `Cmd+` that key.
|
||||||
|
|
||||||
|
## Function Layer (_FL)
|
||||||
|
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | UP | | | | | Reset |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | Left| Down|Right| | | |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | |
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
The function layer is activated by the `Caps-Lock` (`Hyper`) key to access `F` keys. In addition, the `IJKL` are mapped as cursor keys on that layer.
|
||||||
|
|
||||||
|
## Media Layer (_ML)
|
||||||
|
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------------.
|
||||||
|
| | BR- | BR+ | F3 | F4 | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Eject |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | | | | | | |
|
||||||
|
|-----------------------------------------------------------------------------------------+
|
||||||
|
| | | | | | | | | |
|
||||||
|
`-----------------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
The media layer is activated by the right `Cmd` (`FN`) key. It contains the typical macos media keys on the top row. Blank keys act as `Cmd+` that key on the base layer.
|
||||||
|
|
||||||
|
|
||||||
+1
-53
@@ -1,53 +1 @@
|
|||||||
#include "e6v2.h"
|
#include "e6v2.h"
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
// put your keyboard start-up code here
|
|
||||||
// runs once when the firmware starts up
|
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
|
||||||
// put your looping keyboard code here
|
|
||||||
// runs every cycle (a lot)
|
|
||||||
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
// put your per-action keyboard code here
|
|
||||||
// runs for every action, just before processing by the firmware
|
|
||||||
|
|
||||||
return process_record_user(keycode, record);
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
|
||||||
DDRB |= (1<<6);
|
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
|
||||||
// output low
|
|
||||||
DDRB |= (1<<2);
|
|
||||||
PORTB &= ~(1<<2);
|
|
||||||
} else {
|
|
||||||
// Hi-Z
|
|
||||||
DDRB &= ~(1<<2);
|
|
||||||
PORTB &= ~(1<<2);
|
|
||||||
}
|
|
||||||
// DDRB |= (1<<7);
|
|
||||||
// DDRB |= (1<<1);
|
|
||||||
// DDRB |= (1<<3);
|
|
||||||
// DDRE |= (1<<6);
|
|
||||||
if (usb_led == 0){
|
|
||||||
PORTB |= (1<<6);
|
|
||||||
// PORTB |= (1<<7);
|
|
||||||
// PORTB |= (1<<1);
|
|
||||||
// PORTB |= (1<<3);
|
|
||||||
// PORTE |= (1<<6);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
PORTB &= ~(1<<6);
|
|
||||||
// PORTB &= ~(1<<7);
|
|
||||||
}
|
|
||||||
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
|
||||||
+8
-60
@@ -3,64 +3,12 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT( \
|
#ifdef KEYBOARD_e6v2_oe
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
#include "oe.h"
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
|
||||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
|
||||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
|
||||||
)\
|
|
||||||
{\
|
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
|
||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
|
||||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_60_ansi( \
|
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
|
||||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
|
||||||
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
|
||||||
)\
|
|
||||||
{\
|
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
|
||||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \
|
|
||||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_hhkb( \
|
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
|
||||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
|
||||||
K41, K42, K46, K4B, K4C \
|
|
||||||
)\
|
|
||||||
{\
|
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
|
||||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
|
||||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
|
||||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_hhkb_splits( \
|
|
||||||
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, \
|
|
||||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
|
||||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
|
||||||
K41, K42, K46, K4B, K4C \
|
|
||||||
)\
|
|
||||||
{\
|
|
||||||
{ 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, KC_NO }, \
|
|
||||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
|
||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
|
||||||
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_e6v2_le
|
||||||
|
#include "le.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1 +0,0 @@
|
|||||||
#include "../../config.h"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#include "../../config.h"
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
|
#define MANUFACTURER Exclusive / E-Team
|
||||||
|
#define PRODUCT E6-V2 LE
|
||||||
|
#define DESCRIPTION E6-V2 LE QMK PCB (Mid-Port)
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/* QMK E6-V2 PCB default pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
|
||||||
|
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E6
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 12
|
||||||
|
#define RGBLIGHT_HUE_STEP 12
|
||||||
|
#define RGBLIGHT_SAT_STEP 12
|
||||||
|
#define RGBLIGHT_VAL_STEP 12
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 2
|
||||||
|
#define BACKLIGHT_BREAHTING
|
||||||
|
#define BREATHING_PERIOD 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "E6-V2 LE",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.75}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.25}, {"label":"Win", "x":3, "y":4, "w":1.25}, {"label":"Alt", "x":4.25, "y":4, "w":1.25}, {"x":5.5, "y":4, "w":2.75}, {"x":8.25, "y":4, "w":1.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_MENU, KC_SPACE, KC_SPACE, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
#include "le.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
DDRB |= (1<<6);
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// output low
|
||||||
|
DDRB |= (1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
DDRB &= ~(1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
}
|
||||||
|
// DDRB |= (1<<7);
|
||||||
|
// DDRB |= (1<<1);
|
||||||
|
// DDRB |= (1<<3);
|
||||||
|
// DDRE |= (1<<6);
|
||||||
|
if (usb_led == 0){
|
||||||
|
PORTB |= (1<<6);
|
||||||
|
// PORTB |= (1<<7);
|
||||||
|
// PORTB |= (1<<1);
|
||||||
|
// PORTB |= (1<<3);
|
||||||
|
// PORTE |= (1<<6);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
PORTB &= ~(1<<6);
|
||||||
|
// PORTB &= ~(1<<7);
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#ifndef LE_H
|
||||||
|
#define LE_H
|
||||||
|
|
||||||
|
#include "../e6v2.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||||
|
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
|
||||||
|
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
|
||||||
|
K40, K42, K43, K44, K47, K49, K4A, K4B, K4C, K4D, K4E \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||||
|
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||||
|
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
|
||||||
|
{ K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, K4E }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# E6-V2 Last Edition (LE)
|
||||||
|
|
||||||
|
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
||||||
|
|
||||||
|
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
|
Hardware Supported: E6-V2 LE Mid Port rev.qmk
|
||||||
|
Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make e6v2/le:default
|
||||||
|
|
||||||
|
Or to make and flash:
|
||||||
|
|
||||||
|
make e6v2/le:default:dfu
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "E6-V2",
|
"keyboard_name": "E6-V2 OE",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,53 @@
|
|||||||
|
#include "oe.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
DDRB |= (1<<6);
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
// output low
|
||||||
|
DDRB |= (1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
DDRB &= ~(1<<2);
|
||||||
|
PORTB &= ~(1<<2);
|
||||||
|
}
|
||||||
|
// DDRB |= (1<<7);
|
||||||
|
// DDRB |= (1<<1);
|
||||||
|
// DDRB |= (1<<3);
|
||||||
|
// DDRE |= (1<<6);
|
||||||
|
if (usb_led == 0){
|
||||||
|
PORTB |= (1<<6);
|
||||||
|
// PORTB |= (1<<7);
|
||||||
|
// PORTB |= (1<<1);
|
||||||
|
// PORTB |= (1<<3);
|
||||||
|
// PORTE |= (1<<6);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
PORTB &= ~(1<<6);
|
||||||
|
// PORTB &= ~(1<<7);
|
||||||
|
}
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
#ifndef OE_H
|
||||||
|
#define OE_H
|
||||||
|
|
||||||
|
#include "../e6v2.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
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, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||||
|
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_60_ansi( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
||||||
|
K40, K41, K42, K46, K4A, K4B, K4C, K4D \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||||
|
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \
|
||||||
|
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_hhkb( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K41, K42, K46, K4B, K4C \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||||
|
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||||
|
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_hhkb_splits( \
|
||||||
|
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, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
|
||||||
|
K41, K42, K46, K4B, K4C \
|
||||||
|
)\
|
||||||
|
{\
|
||||||
|
{ 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, KC_NO }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \
|
||||||
|
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# E6-V2 Original Edition (OE)
|
||||||
|
|
||||||
|
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
||||||
|
|
||||||
|
Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287)
|
||||||
|
Hardware Supported: E6-V2 OE Mid Port rev.qmk
|
||||||
|
Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make e6v2/oe:default
|
||||||
|
|
||||||
|
Or to make and flash:
|
||||||
|
|
||||||
|
make e6v2/oe:default:dfu
|
||||||
|
|
||||||
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
|
||||||
|
LAYOUTS = 60_ansi
|
||||||
@@ -1,18 +1,9 @@
|
|||||||
E6-V2
|
# E6-V2
|
||||||
===
|
|
||||||
|
|
||||||
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/)
|
||||||
|
|
||||||
Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287)
|
The E6V2 has been available with either a bootmapper client or QMK powered PCB. During the second round, the QMK powered PCB was redesigned and used different ports and a different switch matrix.
|
||||||
Hardware Supported: E6-V2 Mid Port rev.qmk
|
|
||||||
Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Please use the appropriate version when making your firmware.
|
||||||
|
|
||||||
make e6v2:default
|
|
||||||
|
|
||||||
Or to make and flash:
|
|
||||||
|
|
||||||
make e6v2:default:dfu
|
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
+1
-70
@@ -1,70 +1 @@
|
|||||||
# MCU name
|
DEFAULT_FOLDER = e6v2/oe
|
||||||
#MCU = at90usb1287
|
|
||||||
MCU = atmega32u4
|
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# change yes to no to disable
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
|
||||||
RGBLIGHT_ENABLE = yes
|
|
||||||
MIDI_ENABLE = no # MIDI controls
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
|
|
||||||
LAYOUTS = 60_ansi
|
|
||||||
Whitespace-only changes.
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -31,6 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
#include "backlight.h"
|
||||||
|
extern backlight_config_t backlight_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
#else // USE_SERIAL
|
#else // USE_SERIAL
|
||||||
@@ -58,6 +63,8 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
|||||||
|
|
||||||
#define ERROR_DISCONNECT_COUNT 5
|
#define ERROR_DISCONNECT_COUNT 5
|
||||||
|
|
||||||
|
#define SERIAL_LED_ADDR 0x00
|
||||||
|
|
||||||
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||||
|
|
||||||
static uint8_t error_count = 0;
|
static uint8_t error_count = 0;
|
||||||
@@ -201,6 +208,15 @@ int i2c_transaction(void) {
|
|||||||
err = i2c_master_write(0x00);
|
err = i2c_master_write(0x00);
|
||||||
if (err) goto i2c_error;
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
// Write backlight level for slave to read
|
||||||
|
err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0);
|
||||||
|
#else
|
||||||
|
// Write zero, so our byte index is the same
|
||||||
|
err = i2c_master_write(0x00);
|
||||||
|
#endif
|
||||||
|
if (err) goto i2c_error;
|
||||||
|
|
||||||
// Start read
|
// Start read
|
||||||
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
|
||||||
if (err) goto i2c_error;
|
if (err) goto i2c_error;
|
||||||
@@ -233,6 +249,11 @@ int serial_transaction(void) {
|
|||||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
// Write backlight level for slave to read
|
||||||
|
serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -273,13 +294,22 @@ void matrix_slave_scan(void) {
|
|||||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||||
|
|
||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
// Read backlight level sent from master and update level on slave
|
||||||
|
backlight_set(i2c_slave_buffer[0]);
|
||||||
|
#endif
|
||||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
i2c_slave_buffer[i] = matrix[offset+i];
|
i2c_slave_buffer[i+1] = matrix[offset+i];
|
||||||
}
|
}
|
||||||
#else // USE_SERIAL
|
#else // USE_SERIAL
|
||||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
serial_slave_buffer[i] = matrix[offset+i];
|
serial_slave_buffer[i] = matrix[offset+i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
// Read backlight level sent from master and update level on slave
|
||||||
|
backlight_set(serial_master_buffer[SERIAL_LED_ADDR]);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
# ErgoDash
|
# ErgoDash
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Keyboard Maintainer: [omkbd](https://github.com/omkbd) [@omkbd](https://twitter.com/omkbd)
|
Keyboard Maintainer: [omkbd](https://github.com/omkbd) [@omkbd](https://twitter.com/omkbd)
|
||||||
Hardware Supported: ErgoDash PCB, Pro Micro ATmega32u4
|
Hardware Supported: ErgoDash PCB, Pro Micro ATmega32u4
|
||||||
Hardware Availability: In preparation
|
Hardware Availability: Order your own [yourself](https://github.com/omkbd/ErgoDash)
|
||||||
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make ergodash/rev1:default
|
make ergodash/rev2:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||||
|
|
||||||
|
# Layout
|
||||||
|

|
||||||
|

|
||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "rev1.h"
|
#include "rev1.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Used to create a keymap using only KC_ prefixed keys
|
// Used to create a keymap using only KC_ prefixed keys
|
||||||
#define LAYOUT_kc( \
|
#define LAYOUT_kc( \
|
||||||
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef REV2_CONFIG_H
|
||||||
|
#define REV2_CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0100
|
||||||
|
#define MANUFACTURER Omkbd
|
||||||
|
#define PRODUCT ErgoDash
|
||||||
|
#define DESCRIPTION Power
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
|
||||||
|
#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 tapping term */
|
||||||
|
#define TAPPING_TERM 120
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#define BACKLIGHT_LEVELS 7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BREATHING_PERIOD 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 24 // Number of LEDs
|
||||||
|
#define ws2812_PORTREG PORTD
|
||||||
|
#define ws2812_DDRREG DDRD
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
// #define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
// #define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef ERGODASH_H
|
||||||
|
#define ERGODASH_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_ergodash_rev2
|
||||||
|
#include "rev2.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Used to create a keymap using only KC_ prefixed keys
|
||||||
|
#define LAYOUT_kc( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
|
||||||
|
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
|
||||||
|
) \
|
||||||
|
LAYOUT( \
|
||||||
|
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
|
||||||
|
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
|
||||||
|
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
|
||||||
|
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
|
||||||
|
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 24
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
#define KC_JPN LALT(KC_GRV)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Caps |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | ` | Q | W | E | R | T | - | | = | Y | U | I | O | P | \ |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | Del | | Bksp | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | JPN | | Enter| N | M | , | . | / | Shift|
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | Ctrl | GUI | ALt |Adjust|||||||| Lower| Space| |||||||| | Enter| Raise|||||||| Left | Down | Up | Right|
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CAPS, \
|
||||||
|
KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_JPN , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| 6 | 7 | 8 | 9 | 0 | JPN | | Enter| N | M | < | > | ? | Shift|
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | Ctrl | GUI | ALt |Adjust|||||||| Lower| Space| |||||||| | Enter| Raise|||||||| Home |PageDn|PageUp| End |
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
|
||||||
|
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \
|
||||||
|
KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_JPN , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| 6 | 7 | 8 | 9 | 0 | JPN | | Enter| N | M | < | > | ? | Shift|
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | Ctrl | GUI | ALt |Adjust|||||||| Lower| Space| |||||||| | Enter| Raise|||||||| Home |PageDn|PageUp| End |
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \
|
||||||
|
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \
|
||||||
|
KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_JPN , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | | | | |||||||| | | |||||||| | | |||||||| | | | |
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
|
||||||
|
_______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______,_______,_______, _______,_______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
print("mode just switched to qwerty and this is a huge string\n");
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
File renamed without changes.
@@ -0,0 +1,39 @@
|
|||||||
|
#include "ergodash.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_SONG(tone_startup);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// // green led on
|
||||||
|
// DDRD |= (1<<5);
|
||||||
|
// PORTD &= ~(1<<5);
|
||||||
|
|
||||||
|
// // orange led on
|
||||||
|
// DDRB |= (1<<0);
|
||||||
|
// PORTB &= ~(1<<0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
||||||
|
|
||||||
|
void shutdown_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(tone_goodbye);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
#ifndef REV1_H
|
||||||
|
#define REV1_H
|
||||||
|
|
||||||
|
#include "ergodash.h"
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
#include <stddef.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
|
||||||
|
#ifndef FLIP_HALF
|
||||||
|
// Standard Keymap
|
||||||
|
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
|
||||||
|
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05, L06 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15, L16 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25, L26 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45, L46 }, \
|
||||||
|
{ R06, R05, R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R16, R15, R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R26, R25, R24, R23, R22, R21, R20 }, \
|
||||||
|
{ R36, R35, R34, R33, R32, R31, R30 }, \
|
||||||
|
{ R46, R45, R44, R43, R42, R41, R40 } \
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// Keymap with right side flipped
|
||||||
|
// (TRRS jack on both halves are to the right)
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
|
||||||
|
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05, L06 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15, L16 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25, L26 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35, L36 }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45, L46 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05, R06 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15, R16 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25, R26 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35, R36 }, \
|
||||||
|
{ R40, R41, R42, R43, R44, R45, R46 } \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
BACKLIGHT_ENABLE = yes
|
||||||
@@ -72,4 +72,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
|
|
||||||
CUSTOM_MATRIX = yes
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
DEFAULT_FOLDER = ergodash/rev1
|
DEFAULT_FOLDER = ergodash/rev2
|
||||||
@@ -14,13 +14,13 @@ The ErgoDone is a modified version of the ErgoDox, made by K.T.E.C., with pre-so
|
|||||||
|
|
||||||
# Building the firmware
|
# Building the firmware
|
||||||
|
|
||||||
[Install the build tools.](https://docs.qmk.fm/getting_started_build_tools.html)
|
[Install the build tools.](https://docs.qmk.fm/#/getting_started_build_tools)
|
||||||
|
|
||||||
In the root directory of the repository, build the firmware with a command like:
|
In the root directory of the repository, build the firmware with a command like:
|
||||||
|
|
||||||
make ergodone:default
|
make ergodone:default
|
||||||
|
|
||||||
For more information on the layout option and other ones, see the [`make` guide](https://docs.qmk.fm/getting_started_make_guide.html).
|
For more information on the layout option and other ones, see the [`make` guide](https://docs.qmk.fm/#/getting_started_make_guide).
|
||||||
|
|
||||||
# Flashing the firmware onto the keyboard
|
# Flashing the firmware onto the keyboard
|
||||||
|
|
||||||
|
|||||||
@@ -81,10 +81,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* fix space cadet rollover issue */
|
/* fix space cadet rollover issue */
|
||||||
#define DISABLE_SPACE_CADET_ROLLOVER
|
#define DISABLE_SPACE_CADET_ROLLOVER
|
||||||
|
|
||||||
// #define RGB_MIDI
|
// #define RGBW_BB_TWI
|
||||||
#define RGBW_BB_TWI
|
|
||||||
|
|
||||||
#define RGBW 1
|
// #define RGBW 1
|
||||||
|
|
||||||
/* "debounce" is measured in keyboard scans. Some users reported
|
/* "debounce" is measured in keyboard scans. Some users reported
|
||||||
* needing values as high as 15, which was at the time around 50ms.
|
* needing values as high as 15, which was at the time around 50ms.
|
||||||
@@ -102,6 +101,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define USB_MAX_POWER_CONSUMPTION 500
|
#define USB_MAX_POWER_CONSUMPTION 500
|
||||||
|
|
||||||
|
// RGB backlight
|
||||||
|
#define DRIVER_ADDR_1 0b1110100
|
||||||
|
#define DRIVER_ADDR_2 0b1110111
|
||||||
|
#define DRIVER_COUNT 2
|
||||||
|
#define DRIVER_1_LED_TOTAL 24
|
||||||
|
#define DRIVER_2_LED_TOTAL 24
|
||||||
|
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||||
|
#define RGB_MATRIX_SKIP_FRAMES 10
|
||||||
|
|
||||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||||
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
||||||
/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
|
/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "i2cmaster.h"
|
|
||||||
|
|
||||||
|
|
||||||
extern inline void ergodox_board_led_on(void);
|
extern inline void ergodox_board_led_on(void);
|
||||||
extern inline void ergodox_right_led_1_on(void);
|
extern inline void ergodox_right_led_1_on(void);
|
||||||
@@ -24,9 +22,8 @@ extern inline void ergodox_right_led_set(uint8_t led, uint8_t n);
|
|||||||
|
|
||||||
extern inline void ergodox_led_all_set(uint8_t n);
|
extern inline void ergodox_led_all_set(uint8_t n);
|
||||||
|
|
||||||
|
|
||||||
bool i2c_initialized = 0;
|
bool i2c_initialized = 0;
|
||||||
uint8_t mcp23018_status = 0x20;
|
i2c_status_t mcp23018_status = 0x20;
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
|
// keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
|
||||||
@@ -114,33 +111,36 @@ uint8_t init_mcp23018(void) {
|
|||||||
// uint8_t sreg_prev;
|
// uint8_t sreg_prev;
|
||||||
// sreg_prev=SREG;
|
// sreg_prev=SREG;
|
||||||
// cli();
|
// cli();
|
||||||
|
|
||||||
if (i2c_initialized == 0) {
|
if (i2c_initialized == 0) {
|
||||||
i2c_init(); // on pins D(1,0)
|
i2c_init(); // on pins D(1,0)
|
||||||
i2c_initialized = true;
|
i2c_initialized = true;
|
||||||
_delay_ms(1000);
|
_delay_ms(1000);
|
||||||
}
|
}
|
||||||
|
// i2c_init(); // on pins D(1,0)
|
||||||
|
// _delay_ms(1000);
|
||||||
|
|
||||||
// set pin direction
|
// set pin direction
|
||||||
// - unused : input : 1
|
// - unused : input : 1
|
||||||
// - input : input : 1
|
// - input : input : 1
|
||||||
// - driving : output : 0
|
// - driving : output : 0
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
i2c_stop();
|
i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
|
|
||||||
// set pull-up
|
// set pull-up
|
||||||
// - unused : on : 1
|
// - unused : on : 1
|
||||||
// - input : on : 1
|
// - input : on : 1
|
||||||
// - driving : off : 0
|
// - driving : off : 0
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
i2c_stop();
|
i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
|
|
||||||
#ifdef LEFT_LEDS
|
#ifdef LEFT_LEDS
|
||||||
if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
|
if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
|
||||||
@@ -164,22 +164,22 @@ uint8_t ergodox_left_leds_update(void) {
|
|||||||
// - unused : hi-Z : 1
|
// - unused : hi-Z : 1
|
||||||
// - input : hi-Z : 1
|
// - input : hi-Z : 1
|
||||||
// - driving : hi-Z : 1
|
// - driving : hi-Z : 1
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE);
|
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
if (mcp23018_status) goto out;
|
if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(OLATA);
|
mcp23018_status = i2c_write(OLATA, ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
if (mcp23018_status) goto out;
|
if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0b11111111
|
mcp23018_status = i2c_write(0b11111111
|
||||||
& ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT)
|
& ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT),
|
||||||
);
|
ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
if (mcp23018_status) goto out;
|
if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0b11111111
|
mcp23018_status = i2c_write(0b11111111
|
||||||
& ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT)
|
& ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT)
|
||||||
& ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT)
|
& ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT),
|
||||||
);
|
ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
if (mcp23018_status) goto out;
|
if (mcp23018_status) goto out;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
i2c_stop();
|
i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
return mcp23018_status;
|
return mcp23018_status;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -207,3 +207,130 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
/* driver
|
||||||
|
* | R location
|
||||||
|
* | | G location
|
||||||
|
* | | | B location
|
||||||
|
* | | | | */
|
||||||
|
{0, C3_1, C2_1, C4_1}, // LED1 on right
|
||||||
|
{0, C6_1, C5_1, C7_1}, // LED2
|
||||||
|
{0, C4_2, C3_2, C5_2}, // LED3
|
||||||
|
{0, C7_2, C6_2, C8_2}, // LED4
|
||||||
|
{0, C2_3, C1_3, C3_3}, // LED5
|
||||||
|
{0, C5_3, C4_3, C6_3}, // LED6
|
||||||
|
{0, C8_3, C7_3, C9_3}, // LED7
|
||||||
|
{0, C2_4, C1_4, C3_4}, // LED8
|
||||||
|
{0, C6_4, C5_4, C7_4}, // LED9
|
||||||
|
{0, C2_5, C1_5, C3_5}, // LED10
|
||||||
|
{0, C7_5, C6_5, C8_5}, // LED11
|
||||||
|
{0, C2_6, C1_6, C3_6}, // LED12
|
||||||
|
{0, C5_6, C4_6, C6_6}, // LED13
|
||||||
|
{0, C8_6, C7_6, C9_6}, // LED14
|
||||||
|
{0, C2_7, C1_7, C3_7}, // LED15
|
||||||
|
{0, C5_7, C4_7, C6_7}, // LED16
|
||||||
|
{0, C2_8, C1_8, C3_8}, // LED17
|
||||||
|
{0, C5_8, C4_8, C6_8}, // LED18
|
||||||
|
|
||||||
|
{0, C3_9, C2_9, C4_9}, // LED19
|
||||||
|
{0, C6_9, C5_9, C7_9}, // LED20
|
||||||
|
{0, C4_10, C3_10, C5_10}, // LED21
|
||||||
|
{0, C7_10, C6_10, C8_10}, // LED22
|
||||||
|
{0, C2_11, C1_11, C3_11}, // LED23
|
||||||
|
{0, C5_11, C4_11, C6_11}, // LED24
|
||||||
|
|
||||||
|
{1, C3_1, C2_1, C4_1}, // LED1 on left
|
||||||
|
{1, C6_1, C5_1, C7_1}, // LED2
|
||||||
|
{1, C4_2, C3_2, C5_2}, // LED3
|
||||||
|
{1, C7_2, C6_2, C8_2}, // LED4
|
||||||
|
{1, C2_3, C1_3, C3_3}, // LED5
|
||||||
|
{1, C5_3, C4_3, C6_3}, // LED6
|
||||||
|
{1, C8_3, C7_3, C9_3}, // LED7
|
||||||
|
{1, C2_4, C1_4, C3_4}, // LED8
|
||||||
|
{1, C6_4, C5_4, C7_4}, // LED9
|
||||||
|
{1, C2_5, C1_5, C3_5}, // LED10
|
||||||
|
{1, C7_5, C6_5, C8_5}, // LED11
|
||||||
|
{1, C2_6, C1_6, C3_6}, // LED12
|
||||||
|
{1, C5_6, C4_6, C6_6}, // LED13
|
||||||
|
{1, C8_6, C7_6, C9_6}, // LED14
|
||||||
|
{1, C2_7, C1_7, C3_7}, // LED15
|
||||||
|
{1, C5_7, C4_7, C6_7}, // LED16
|
||||||
|
{1, C2_8, C1_8, C3_8}, // LED17
|
||||||
|
{1, C5_8, C4_8, C6_8}, // LED18
|
||||||
|
|
||||||
|
{1, C3_9, C2_9, C4_9}, // LED19
|
||||||
|
{1, C6_9, C5_9, C7_9}, // LED20
|
||||||
|
{1, C4_10, C3_10, C5_10}, // LED21
|
||||||
|
{1, C7_10, C6_10, C8_10}, // LED22
|
||||||
|
{1, C2_11, C1_11, C3_11}, // LED23
|
||||||
|
{1, C5_11, C4_11, C6_11} // LED24
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
|
||||||
|
/*{row | col << 4}
|
||||||
|
| {x=0..224, y=0..64}
|
||||||
|
| | modifier
|
||||||
|
| | | */
|
||||||
|
{{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right
|
||||||
|
{{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2
|
||||||
|
{{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3
|
||||||
|
{{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4
|
||||||
|
{{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5
|
||||||
|
|
||||||
|
{{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6
|
||||||
|
{{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7
|
||||||
|
{{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8
|
||||||
|
{{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9
|
||||||
|
{{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10
|
||||||
|
|
||||||
|
{{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11
|
||||||
|
{{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12
|
||||||
|
{{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13
|
||||||
|
{{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14
|
||||||
|
{{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15
|
||||||
|
|
||||||
|
{{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16
|
||||||
|
{{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17
|
||||||
|
{{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18
|
||||||
|
{{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19
|
||||||
|
{{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20
|
||||||
|
|
||||||
|
{{4|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 21
|
||||||
|
{{4|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 22
|
||||||
|
{{4|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 23
|
||||||
|
{{4|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 24
|
||||||
|
|
||||||
|
{{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left
|
||||||
|
{{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2
|
||||||
|
{{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3
|
||||||
|
{{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4
|
||||||
|
{{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5
|
||||||
|
|
||||||
|
{{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6
|
||||||
|
{{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7
|
||||||
|
{{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8
|
||||||
|
{{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9
|
||||||
|
{{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10
|
||||||
|
|
||||||
|
{{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11
|
||||||
|
{{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12
|
||||||
|
{{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13
|
||||||
|
{{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14
|
||||||
|
{{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15
|
||||||
|
|
||||||
|
{{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16
|
||||||
|
{{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17
|
||||||
|
{{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18
|
||||||
|
{{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19
|
||||||
|
{{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20
|
||||||
|
|
||||||
|
{{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21
|
||||||
|
{{4|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 22
|
||||||
|
{{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23
|
||||||
|
{{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24
|
||||||
|
};
|
||||||
|
#endif
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "i2cmaster.h"
|
#include "i2c_master.h"
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
|
|
||||||
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
|
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
#define OLATA 0x14 // output latch register
|
#define OLATA 0x14 // output latch register
|
||||||
#define OLATB 0x15
|
#define OLATB 0x15
|
||||||
|
|
||||||
extern uint8_t mcp23018_status;
|
extern i2c_status_t mcp23018_status;
|
||||||
|
#define ERGODOX_EZ_I2C_TIMEOUT 100
|
||||||
|
|
||||||
void init_ergodox(void);
|
void init_ergodox(void);
|
||||||
void ergodox_blink_all_leds(void);
|
void ergodox_blink_all_leds(void);
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "i2cmaster.h"
|
|
||||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -70,6 +69,7 @@ static void unselect_rows(void);
|
|||||||
static void select_row(uint8_t row);
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
static uint8_t mcp23018_reset_loop;
|
static uint8_t mcp23018_reset_loop;
|
||||||
|
// static uint16_t mcp23018_reset_loop;
|
||||||
|
|
||||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||||
uint32_t matrix_timer;
|
uint32_t matrix_timer;
|
||||||
@@ -177,6 +177,7 @@ uint8_t matrix_scan(void)
|
|||||||
{
|
{
|
||||||
if (mcp23018_status) { // if there was an error
|
if (mcp23018_status) { // if there was an error
|
||||||
if (++mcp23018_reset_loop == 0) {
|
if (++mcp23018_reset_loop == 0) {
|
||||||
|
// if (++mcp23018_reset_loop >= 1300) {
|
||||||
// since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
// since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
||||||
// this will be approx bit more frequent than once per second
|
// this will be approx bit more frequent than once per second
|
||||||
print("trying to reset mcp23018\n");
|
print("trying to reset mcp23018\n");
|
||||||
@@ -294,13 +295,14 @@ static matrix_row_t read_cols(uint8_t row)
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
uint8_t data = 0;
|
uint8_t data = 0;
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
data = i2c_readNak();
|
mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
|
||||||
data = ~data;
|
data = ~((uint8_t)mcp23018_status);
|
||||||
|
mcp23018_status = I2C_STATUS_SUCCESS;
|
||||||
out:
|
out:
|
||||||
i2c_stop();
|
i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -349,11 +351,11 @@ static void select_row(uint8_t row)
|
|||||||
} else {
|
} else {
|
||||||
// set active row low : 0
|
// set active row low : 0
|
||||||
// set other rows hi-Z : 1
|
// set other rows hi-Z : 1
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
mcp23018_status = i2c_write(0xFF & ~(1<<row)); if (mcp23018_status) goto out;
|
mcp23018_status = i2c_write(0xFF & ~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
out:
|
out:
|
||||||
i2c_stop();
|
i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// select on teensy
|
// select on teensy
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
# # project specific files
|
# # project specific files
|
||||||
SRC = twimaster.c \
|
SRC = matrix.c \
|
||||||
matrix.c
|
i2c_master.c
|
||||||
|
|
||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
@@ -82,6 +82,7 @@ UNICODE_ENABLE = yes # Unicode
|
|||||||
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||||
SLEEP_LED_ENABLE = no
|
SLEEP_LED_ENABLE = no
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = no
|
||||||
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
|
||||||
LAYOUTS = ergodox
|
LAYOUTS = ergodox
|
||||||
@@ -21,6 +21,7 @@ enum custom_keycodes {
|
|||||||
#define XXXXXXX KC_NO
|
#define XXXXXXX KC_NO
|
||||||
#define KC_FN1 MO(_FN1)
|
#define KC_FN1 MO(_FN1)
|
||||||
#define KC_FN2 MO(_FN2)
|
#define KC_FN2 MO(_FN2)
|
||||||
|
#define KC_ESFN1 LT(_FN1, KC_ESC)
|
||||||
#define KC_SPFN1 LT(_FN1, KC_SPACE)
|
#define KC_SPFN1 LT(_FN1, KC_SPACE)
|
||||||
#define KC_SPFN2 LT(_FN2, KC_SPACE)
|
#define KC_SPFN2 LT(_FN2, KC_SPACE)
|
||||||
#define KC_BSFN1 LT(_FN1, KC_BSPC)
|
#define KC_BSFN1 LT(_FN1, KC_BSPC)
|
||||||
|
|||||||
@@ -1,68 +1,24 @@
|
|||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "../../config.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
#define VENDOR_ID 0xFEED
|
|
||||||
#define PRODUCT_ID 0x6060
|
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER 40 Percent Club
|
|
||||||
#define PRODUCT Gherkin
|
|
||||||
#define DESCRIPTION A 30 key ortholinear keyboard
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
#define MATRIX_ROWS 5
|
|
||||||
#define MATRIX_COLS 6
|
|
||||||
|
|
||||||
/* key matrix pins */
|
|
||||||
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
|
|
||||||
#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 }
|
|
||||||
#define UNUSED_PINS
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
#define BACKLIGHT_PIN B5
|
|
||||||
#ifdef BACKLIGHT_PIN
|
|
||||||
#define BACKLIGHT_LEVELS 3
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
|
||||||
#define DEBOUNCING_DELAY 5
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
|
||||||
|
|
||||||
/* Locking resynchronize hack */
|
|
||||||
#define LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
/* key combination for command */
|
|
||||||
#define IS_COMMAND() ( \
|
|
||||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
|
||||||
)
|
|
||||||
|
|
||||||
/* prevent stuck modifiers */
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
/*tap dance definition */
|
//Tap Dance Prerequisite
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
//Mousekeys Settings
|
//Mousekeys Settings
|
||||||
#define MOUSEKEY_INTERVAL 1
|
#define MOUSEKEY_INTERVAL 16
|
||||||
#define MOUSEKEY_DELAY 0
|
#define MOUSEKEY_DELAY 0
|
||||||
#define MOUSEKEY_TIME_TO_MAX 1
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
#define MOUSEKEY_MAX_SPEED 15
|
#define MOUSEKEY_MAX_SPEED 7
|
||||||
#define MOUSEKEY_WHEEL_DELAY 0
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
|
|
||||||
|
/* for QMK DFU bootloader */
|
||||||
#ifdef RGB_DI_PIN
|
/* not required if using default ProMicro bootloader */
|
||||||
#define RGBLIGHT_ANIMATIONS
|
/* set top left key as bootloader mode escape key */
|
||||||
#define RGBLED_NUM 0
|
#define QMK_ESC_OUTPUT B4 // usually COL
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
#define QMK_ESC_INPUT F7 // usually ROW
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
#define QMK_LED B0
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* .-----------------------------------------------------------------------------------------.
|
* .-----------------------------------------------------------------------------------------.
|
||||||
* | Q//ESC | W | E | R | T | Y | U | I | O | P |
|
* | Q//ESC | W | E | R | T | Y | U | I | O | P |
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
* | A | S | D | F | G | H | J | K | L | ENTER |
|
* | A | S | D | F | G | H | J | K | L | SPACE |
|
||||||
* | | | | | | | | | |SFThold |
|
* | | | | | | | | | |SFThold |
|
||||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
* | Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BKSC |
|
* | Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BKSC |
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||

|

|
||||||
|
|
||||||
# Gherkin Wanleg Layout
|
# Gherkin Wanleg Layout
|
||||||
Here is the layout I came up with to preserve a standard QWERTY layout as much as possible, in as few layers as possible for a 30 key board.
|
This is the layout I came up with to preserve a standard QWERTY 104 key ANSI layout as much as possible, in as few layers as possible for a 30 key board.
|
||||||
I originally set up a few Tap Dance keys, but dropped half of them in favor of chorded versions, since in actual use, they tended to impede typing speed more than their current two-key versions.
|
I originally set up a few Tap Dance keys, but dropped half of them in favor of chorded versions since in actual use, they tended to impede typing speed more than their current two-key versions.
|
||||||
I've left them in my layout ready for use if anyone wants to try them out:
|
I've left them in my `keymap.c` ready for use if anyone wants to try them out:
|
||||||
|
|
||||||
Legend Name | Single Tap | Double Tap | Hold
|
Legend Name | Single Tap | Double Tap | Hold
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
@@ -13,35 +12,75 @@ Sft//Cp | shift | caps lock | *null*
|
|||||||
Q//Esc | KC_Q | escape | *null*
|
Q//Esc | KC_Q | escape | *null*
|
||||||
|
|
||||||
# Gherkin Flashing
|
# Gherkin Flashing
|
||||||
## Linux
|
|
||||||
The ProMicro doesn't like dfu-programmer, so we have to use AVRdude. What follows below are instructions for Linux taken from https://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448.html
|
|
||||||
|
|
||||||
`ls /dev/tty*`
|
|
||||||
|
|
||||||
Next, plug in your device and re-run the command, the same as before:
|
|
||||||
|
|
||||||
`ls /dev/tty*`
|
|
||||||
|
|
||||||
There should be one more output device than was seen previously. For me, it's /dev/ttyACM0.
|
|
||||||
To flash the device, you need to have AVRdude installed. On Linux, you can do this with your normal package manager.
|
|
||||||
Once you have AVRdude set up, navigate to the directory with your .hex file in it. Then, run the following:
|
|
||||||
|
|
||||||
`avrdude -p atmega32u4 -P YOUR_SERIAL_PORT -c avr109 -U flash:w:YOUR_FILENAME.hex`
|
|
||||||
|
|
||||||
Of course, replace YOUR_SERIAL_PORT with your serial port's device name, and YOUR_FILENAME.hex with the appropriate filename. For me, this line looks like this:
|
|
||||||
|
|
||||||
`avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:Soarer_at2usb_v1.12_atmega32u4.hex`
|
|
||||||
|
|
||||||
If it says ''device not in sync'' or similar, your device is no longer in bootloader mode. Unplug it, and get it back into bootloader mode like you did in the previous step (or short the reset pin), and try again.
|
|
||||||
If this still doesn't work, try running the command again as root
|
|
||||||
|
|
||||||
`sudo avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:Soarer_at2usb_v1.12_atmega32u4.hex`
|
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
1. Install the latest version of AVRdude for Windows from http://savannah.nongnu.org/projects/avrdude/
|
1. The standard Gherkin uses a ProMicro (or clone) microcontroller, which has the Caterina bootloader by default.
|
||||||
Test that it installed correctly by running "avrdude" from Command Prompt. It should display a usage message with version information at the end
|
2. If you have never flashed your ProMicro with QMK before, you will need to short the RST pin to GND to put it into bootloader mode (you only have 7 seconds to flash once it enters bootloader mode). You may need to touch the RST pin to GND **TWICE** in quick succession if it doesn't flash with just one touch.
|
||||||
2. Open Device Manager and take a look at your "Ports (COM & LPT)" section
|
3. Once connected to your computer, you should be able to flash using
|
||||||
3. Plug in the Gherkin and short the RESET pin on the microcontroller to Ground to put it into bootloader mode. Take note of the new COM device that shows up. After 8 seconds or so the microcontroller will leave bootloader mode and it will disappear from that section
|
`make gherkin:wanleg:avrdude`
|
||||||
4. Open Command Prompt and run the following (substituting "com7" with whatever port you saw earlier)
|
4. Once you've been able to successfully flash the ProMicro, you should be able to use the `RESET` key for future flashes instead of shorting the RST pin.
|
||||||
|
|
||||||
`avrdude -p atmega32u4 -P com7 -c avr109 -U flash:w:YOURHEX.hex`
|
## Linux
|
||||||
|
### First Flash with QMK
|
||||||
|
The built-in `:avrdude` QMK target in Linux doesn't work with the default Caterina bootloader on the ProMicro, so we have to use avrdude separately. The instructions below are adapted from https://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448.html
|
||||||
|
|
||||||
|
1. To flash the device, you need to have AVRdude installed. You can do this via your distro's package manager (or compile from source if needed).
|
||||||
|
2. Once avrdude has been installed, open a terminal and run
|
||||||
|
`ls /dev/tty*`
|
||||||
|
3. Next, plug in your device and re-run `ls /dev/tty*`
|
||||||
|
There should be one more device than was seen previously. Make a note of it. For me, it's `/dev/ttyACM0`.
|
||||||
|
4. Navigate to the directory with your `.hex` file in it. Touch the RST pin to GND **TWICE** in quick succession, then run the following within 7 seconds:
|
||||||
|
`sudo avrdude -p m32u4 -P YOUR_SERIAL_PORT -c avr109 -U flash:w:YOUR_FILENAME.hex`
|
||||||
|
Replace YOUR_SERIAL_PORT with your serial port's device name, and YOUR_FILENAME.hex with the appropriate filename. For me, it looks like this:
|
||||||
|
`sudo avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:gherkin_wanleg.hex`
|
||||||
|
If you miss the 7 second window, the ProMicro will leave bootloader mode and the flash will fail. Hit `Control` + `C` to exit the `avrdude` command, connect RST to GND twice quickly, and try the `avrdude` command again.
|
||||||
|
|
||||||
|
### Subsequent Flashes with QMK
|
||||||
|
1. Re-flashing is similar to the initial flash procedure. Plug in your keyboard, open a terminal and run
|
||||||
|
`ls /dev/tty*`
|
||||||
|
2. Next, hit the `RESET` key on your keyboard and re-run the `ls /dev/tty*` command to find your keyboard's serial port.
|
||||||
|
3. Flash your keyboard with the avrdude command you used for the initial flash within 7 seconds after hitting `RESET`.
|
||||||
|
|
||||||
|
# ProMicro Bootloader Replacement (Caterina to QMK DFU)
|
||||||
|
If you have an Arduino (or clone), you can replace the bootloader for a few extra features (e.g. no more 7 second "flash window", simplified Linux flashing, blinking LED when the ProMicro is in bootloader mode, ability to exit bootloader mode without unplugging your keyboard, among others).
|
||||||
|
The instructions below have been adapted from https://www.reddit.com/r/olkb/comments/8sxgzb/replace_pro_micro_bootloader_with_qmk_dfu/)
|
||||||
|
## Arduino Setup
|
||||||
|
1. Upload the ArduinoISP sketch onto your Arduino board (https://www.arduino.cc/en/Tutorial/ArduinoISP).
|
||||||
|
2. Wire the Arduino to the ProMicro
|
||||||
|
|
||||||
|
| Arduino | ProMicro |
|
||||||
|
| --- | --- |
|
||||||
|
| 10 | RST |
|
||||||
|
| 11 | 16 |
|
||||||
|
| 12 | 14 |
|
||||||
|
| 13 | 15 |
|
||||||
|
| GND | GND |
|
||||||
|
| 5V | VCC |
|
||||||
|
|
||||||
|
## Make the QMK DFU .hex
|
||||||
|
3. In `config.h` add the following. This is already set up in `qmk_firmware/keyboards/gherkin/wanleg`. You only need to do this on other keymaps.
|
||||||
|
```
|
||||||
|
#define QMK_ESC_OUTPUT B4
|
||||||
|
#define QMK_ESC_INPUT F7
|
||||||
|
#define QMK_LED B0
|
||||||
|
```
|
||||||
|
The `QMK_ESC_` lines define where the bootloader escape key is. Refer to the `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` lines in your keyboard's `config.h` to choose your preferred key.
|
||||||
|
You hit the bootloader escape key to exit bootloader mode after you've hit the RESET key to enter bootloader mode (e.g. if you change your mind and don't want to flash just then).
|
||||||
|
On a Gherkin, B4/F7 corresponds to the top-left corner key.
|
||||||
|
`B0` is an indicator light on one of the ProMicro's onboard LEDs. With QMK DFU, it will flash to indicate the ProMicro is in bootloader mode.
|
||||||
|
You can add `#define QMK_SPEAKER C6` if you have a speaker hooked up to pin C6. The Gherkin PCB already uses pin C6 in its switch layout, so you cannot use a speaker on a standard Gherkin.
|
||||||
|
4. Also, you should add `BOOTLOADER = qmk-dfu` to your `rules.mk` file, so it is flagged properly. Again, this is already set up in `qmk_firmware/keyboards/gherkin/wanleg`.
|
||||||
|
5. Once you've made the required edits, it's time to compile the firmware. If you use the `:production` target when compiling, it will produce the usual `.hex` file as well as `_bootloader.hex` and `_production.hex` files. The `_production.hex` will be what we want. This contains the bootloader and the firmware, so we only have to flash once (rather than flash the bootloader, and THEN flash the firmware).
|
||||||
|
For example
|
||||||
|
`make <keyboard>:<keymap>:production`
|
||||||
|
For my particular keymap, for reasons listed in the **Using QMK DFU** section, you should use the following to ensure the bootloader is set properly
|
||||||
|
`make gherkin:wanleg:production dfu=qmk`
|
||||||
|
|
||||||
|
## Burn QMK DFU
|
||||||
|
6. Navigate to the directory with your `_production.hex` file, and burn it with the following command
|
||||||
|
`avrdude -b 19200 -c avrisp -p m32u4 -v -e -U lock:w:0x3F:m -U efuse:w:0xC3:m -U hfuse:w:0xD9:m -U lfuse:w:0x5E:m -U YOUR_production.hex -P comPORT`
|
||||||
|
Change `comPORT` to whatever port is used by the Arduino (e.g. `com11` in Windows or `/dev/ttyACM0` in Linux). Use Device Manager in Windows to find the port being used. Use `ls /dev/tty*` in Linux. Change `YOUR_production.hex` to whatever you've created in the previous step.
|
||||||
|
|
||||||
|
## Using QMK DFU
|
||||||
|
7. Once QMK DFU is burned to your ProMicro, you can then flash subsequent hex files with
|
||||||
|
`make gherkin:<keymap>:dfu dfu=qmk`
|
||||||
|
The `dfu=qmk` conditional will set `BOOTLOADER = qmk-dfu` instead of `BOOTLOADER = caterina`
|
||||||
@@ -1,63 +1,7 @@
|
|||||||
# MCU name
|
TAP_DANCE_ENABLE = yes # Enable Tap Dance (comment if not being implemented)
|
||||||
MCU = atmega32u4
|
|
||||||
|
|
||||||
# Processor frequency.
|
#If ProMicro has QMK DFU bootloader instead of Caterina,
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
#run "make <keyboard>:<keymap> dfu=qmk" when compiling to ensure it is flagged properly after being flashed
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
ifeq ($(strip $(dfu)), qmk)
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
BOOTLOADER = qmk-dfu
|
||||||
# automatically to create a 32-bit value in your source code.
|
endif
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
|
||||||
BOOTLOADER = caterina
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
|
||||||
# comment out to disable the options.
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
|
||||||
AUDIO_ENABLE = no
|
|
||||||
RGBLIGHT_ENABLE = no
|
|
||||||
TAP_DANCE_ENABLE = yes # Enable Tap Dance (comment if not being implemented)
|
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
|
||||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||||
)
|
)
|
||||||
#elif HELIX_ROWS == 5
|
#else
|
||||||
#define LAYOUT_kc( \
|
#define LAYOUT_kc( \
|
||||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
@@ -48,8 +48,6 @@
|
|||||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
|
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
|
||||||
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
|
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
|
||||||
)
|
)
|
||||||
#else
|
|
||||||
#error "expected HELIX_ROWS 3 or 4 or 5"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Helix",
|
"keyboard_name": "Helix",
|
||||||
"url": "",
|
"url": "https://github.com/MakotoKurauchi/helix",
|
||||||
"maintainer": "qmk",
|
"maintainer": "MakotoKurauchi",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Helix rev. 1",
|
"keyboard_name": "Helix rev. 1",
|
||||||
"url": "",
|
"url": "https://github.com/MakotoKurauchi/helix",
|
||||||
"maintainer": "qmk",
|
"maintainer": "MakotoKurauchi",
|
||||||
"width": 13,
|
"width": 13,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"key_count": 60,
|
"key_count": 60,
|
||||||
@@ -11,4 +11,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +30,43 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DESCRIPTION A split keyboard for the cheap makers
|
#define DESCRIPTION A split keyboard for the cheap makers
|
||||||
|
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
#define TAPPING_FORCE_HOLD
|
||||||
|
#define TAPPING_TERM 100
|
||||||
|
|
||||||
|
/* Use I2C or Serial */
|
||||||
|
#define USE_I2C
|
||||||
|
#define USE_SERIAL
|
||||||
|
#define USE_SERIAL_PD2
|
||||||
|
//#define USE_MATRIX_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
// Helix keyboard OLED support
|
||||||
|
// see ./rules.mk: OLED_ENABLE=yes or no
|
||||||
|
#ifdef OLED_ENABLE
|
||||||
|
#define SSD1306OLED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select rows configuration */
|
||||||
|
// Rows are 4 or 5
|
||||||
|
// #define HELIX_ROWS 5 see ./rules.mk
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#if HELIX_ROWS == 4
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||||
|
#else
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||||
|
#endif
|
||||||
|
|
||||||
// wiring of each half
|
// wiring of each half
|
||||||
|
#define MATRIX_COLS 7
|
||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
#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 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
|
||||||
|
|
||||||
@@ -60,6 +96,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define ws2812_PORTREG PORTD
|
#define ws2812_PORTREG PORTD
|
||||||
#define ws2812_DDRREG DDRD
|
#define ws2812_DDRREG DDRD
|
||||||
|
|
||||||
|
// Helix keyboard RGB LED support
|
||||||
|
//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
|
||||||
|
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
|
||||||
|
#ifdef RGBLED_BACK
|
||||||
|
#if HELIX_ROWS == 4
|
||||||
|
#define RGBLED_NUM 25
|
||||||
|
#else
|
||||||
|
#define RGBLED_NUM 32
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define RGBLED_NUM 6
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IOS_DEVICE_ENABLE
|
||||||
|
#if RGBLED_NUM <= 6
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 255
|
||||||
|
#else
|
||||||
|
#if HELIX_ROWS == 4
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 130
|
||||||
|
#else
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 120
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
#else
|
||||||
|
#if RGBLED_NUM <= 6
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 90
|
||||||
|
#else
|
||||||
|
#if HELIX_ROWS == 4
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 45
|
||||||
|
#else
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 35
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#define RGBLIGHT_VAL_STEP 4
|
||||||
|
#endif
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
|
||||||
|
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
||||||
|
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
|
||||||
|
// 120 RGBoff, OLEDoff
|
||||||
|
// 120 OLED
|
||||||
|
// 330 RGB 6
|
||||||
|
// 300 RGB 32
|
||||||
|
// 310 OLED & RGB 32
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 400
|
||||||
|
#else
|
||||||
|
// fix iPhone and iPad power adapter issue
|
||||||
|
// iOS device need lessthan 100
|
||||||
|
#define USB_MAX_POWER_CONSUMPTION 100
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "Helix rev. 2",
|
"keyboard_name": "Helix rev. 2",
|
||||||
"url": "",
|
"url": "https://github.com/MakotoKurauchi/helix",
|
||||||
"maintainer": "qmk",
|
"maintainer": "MakotoKurauchi",
|
||||||
"width": 15,
|
"width": 15,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
|
|||||||
Loaded 100 of 354 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user