Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
670a9b7f83 | ||
|
|
acd3e79add | ||
|
|
8680c50d07 | ||
|
|
8bcefc92d0 | ||
|
|
547eb55553 | ||
|
|
7209266ea1 | ||
|
|
4ed474b66a | ||
|
|
3220b24819 | ||
|
|
fd0ba01d68 | ||
|
|
7c0f2ae6d1 |
No files matched your search
+96
-38
@@ -129,7 +129,7 @@ The following options are used to tweak the various animations:
|
|||||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
|
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||||
|
|
||||||
### Example Usage to Reduce Memory Footprint
|
### Example Usage to Reduce Memory Footprint
|
||||||
@@ -176,44 +176,100 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
|||||||
|
|
||||||
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
||||||
|
|
||||||
|Function |Description |
|
### Utility Functions
|
||||||
|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|Function |Description |
|
||||||
|`rgblight_enable()` |Turn LEDs on, based on their previous state |
|
|--------------------------------------------|-------------------------------------------------------------------|
|
||||||
|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) |
|
|`sethsv(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value |
|
||||||
|`rgblight_disable()` |Turn LEDs off |
|
|`sethsv_raw(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value without RGBLIGHT_LIMIT_VAL check |
|
||||||
|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) |
|
|`setrgb(r, g, b, ledbuf)` |Set ledbuf to the given RGB value where `r`/`g`/`b` |
|
||||||
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
|
||||||
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
### Low level Functions
|
||||||
|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
|Function |Description |
|
||||||
|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
|--------------------------------------------|-------------------------------------------|
|
||||||
|
|`rgblight_set()` |Flash out led buffers to LEDs |
|
||||||
|
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```c
|
||||||
|
sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0
|
||||||
|
sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1
|
||||||
|
sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2
|
||||||
|
rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Effects and Animations Functions
|
||||||
|
#### effect range setting
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|------------------|
|
||||||
|
|`rgblight_set_effect_range(pos, num)` |Set Effects Range |
|
||||||
|
|
||||||
|
#### direct operation
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||||
|
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
|
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_sethsv_noeeprom(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
|
||||||
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
Example:
|
||||||
|`rgblight_toggle()` |Toggle all LEDs between on and off |
|
```c
|
||||||
|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
|
rgblight_sethsv(HSV_WHITE, 0); // led 0
|
||||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
rgblight_sethsv(HSV_RED, 1); // led 1
|
||||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
rgblight_sethsv(HSV_GREEN, 2); // led 2
|
||||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly.
|
||||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
// Note that it is inefficient to call repeatedly.
|
||||||
|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
|
```
|
||||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
|
||||||
|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
|
#### effect mode change
|
||||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
|Function |Description |
|
||||||
|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
|
|--------------------------------------------|-------------|
|
||||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
||||||
|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
|
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||||
|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
|
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||||
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||||
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|
|
||||||
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range |
|
#### effects mode disable/enable
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgblight_toggle()` |Toggle effect range LEDs between on and off |
|
||||||
|
|`rgblight_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||||
|
|`rgblight_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||||
|
|`rgblight_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||||
|
|`rgblight_disable()` |Turn effect range LEDs off |
|
||||||
|
|`rgblight_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) |
|
||||||
|
|
||||||
|
#### hue, sat, val change
|
||||||
|
|Function |Description |
|
||||||
|
|--------------------------------------------|-------------|
|
||||||
|
|`rgblight_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
|
||||||
|
|`rgblight_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||||
|
|`rgblight_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
|
||||||
|
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||||
|
|`rgblight_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
|
||||||
|
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||||
|
|`rgblight_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
|
||||||
|
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||||
|
|`rgblight_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||||
|
|`rgblight_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||||
|
|`rgblight_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||||
|
|`rgblight_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||||
|
|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||||
|
|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|
|
||||||
|
#### query
|
||||||
|
|Function |Description |
|
||||||
|
|-----------------------|-----------------|
|
||||||
|
|`rgblight_get_mode()` |Get current mode |
|
||||||
|
|`rgblight_get_hue()` |Get current hue |
|
||||||
|
|`rgblight_get_sat()` |Get current sat |
|
||||||
|
|`rgblight_get_val()` |Get current val |
|
||||||
|
|
||||||
## Colors
|
## Colors
|
||||||
|
|
||||||
@@ -324,4 +380,6 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth
|
|||||||
```
|
```
|
||||||
<img src="https://user-images.githubusercontent.com/2170248/55743747-119e4c00-5a6e-11e9-91e5-013203ffae8a.JPG" alt="clip mapped" width="70%"/>
|
<img src="https://user-images.githubusercontent.com/2170248/55743747-119e4c00-5a6e-11e9-91e5-013203ffae8a.JPG" alt="clip mapped" width="70%"/>
|
||||||
|
|
||||||
|
## Hardware Modification
|
||||||
|
|
||||||
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
|
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
|
||||||
+19
-19
@@ -75,10 +75,10 @@ uint8_t g_twi_transfer_buffer[20];
|
|||||||
// buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's
|
// buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's
|
||||||
// probably not worth the extra complexity.
|
// probably not worth the extra complexity.
|
||||||
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
|
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
|
||||||
bool g_pwm_buffer_update_required = false;
|
bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false };
|
||||||
|
|
||||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } };
|
uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } };
|
||||||
bool g_led_control_registers_update_required = false;
|
bool g_led_control_registers_update_required[DRIVER_COUNT] = { false };
|
||||||
|
|
||||||
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
||||||
{
|
{
|
||||||
@@ -123,12 +123,13 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_init( uint8_t addr )
|
void IS31FL3733_init( uint8_t addr, uint8_t sync)
|
||||||
{
|
{
|
||||||
// In order to avoid the LEDs being driven with garbage data
|
// In order to avoid the LEDs being driven with garbage data
|
||||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||||
// Set up the mode and other settings, clear the PWM registers,
|
// Set up the mode and other settings, clear the PWM registers,
|
||||||
// then disable software shutdown.
|
// then disable software shutdown.
|
||||||
|
// Sync is passed so set it according to the datasheet.
|
||||||
|
|
||||||
// Unlock the command register.
|
// Unlock the command register.
|
||||||
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||||
@@ -161,7 +162,7 @@ void IS31FL3733_init( uint8_t addr )
|
|||||||
// Set global current to maximum.
|
// Set global current to maximum.
|
||||||
IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF );
|
IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF );
|
||||||
// Disable software shutdown.
|
// Disable software shutdown.
|
||||||
IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 );
|
IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01 );
|
||||||
|
|
||||||
// Wait 10ms to ensure the device has woken up.
|
// Wait 10ms to ensure the device has woken up.
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
@@ -179,7 +180,7 @@ void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
|||||||
g_pwm_buffer[led.driver][led.r] = red;
|
g_pwm_buffer[led.driver][led.r] = red;
|
||||||
g_pwm_buffer[led.driver][led.g] = green;
|
g_pwm_buffer[led.driver][led.g] = green;
|
||||||
g_pwm_buffer[led.driver][led.b] = blue;
|
g_pwm_buffer[led.driver][led.b] = blue;
|
||||||
g_pwm_buffer_update_required = true;
|
g_pwm_buffer_update_required[led.driver] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,35 +219,34 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
|
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_led_control_registers_update_required = true;
|
g_led_control_registers_update_required[led.driver] = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index )
|
||||||
{
|
{
|
||||||
if ( g_pwm_buffer_update_required )
|
if ( g_pwm_buffer_update_required[index] )
|
||||||
{
|
{
|
||||||
// Firstly we need to unlock the command register and select PG1
|
// Firstly we need to unlock the command register and select PG1
|
||||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
|
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
|
||||||
|
|
||||||
IS31FL3733_write_pwm_buffer( addr1, g_pwm_buffer[0] );
|
IS31FL3733_write_pwm_buffer( addr, g_pwm_buffer[index] );
|
||||||
//IS31FL3733_write_pwm_buffer( addr2, g_pwm_buffer[1] );
|
|
||||||
}
|
}
|
||||||
g_pwm_buffer_update_required = false;
|
g_pwm_buffer_update_required[index] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index )
|
||||||
{
|
{
|
||||||
if ( g_led_control_registers_update_required )
|
if ( g_led_control_registers_update_required[index] )
|
||||||
{
|
{
|
||||||
// Firstly we need to unlock the command register and select PG0
|
// Firstly we need to unlock the command register and select PG0
|
||||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
|
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
|
||||||
for ( int i=0; i<24; i++ )
|
for ( int i=0; i<24; i++ )
|
||||||
{
|
{
|
||||||
IS31FL3733_write_register(addr1, i, g_led_control_registers[0][i] );
|
IS31FL3733_write_register(addr, i, g_led_control_registers[index][i] );
|
||||||
//IS31FL3733_write_register(addr2, i, g_led_control_registers[1][i] );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
g_led_control_registers_update_required[index] = false;
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ typedef struct is31_led {
|
|||||||
|
|
||||||
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
||||||
|
|
||||||
void IS31FL3733_init( uint8_t addr );
|
void IS31FL3733_init( uint8_t addr, uint8_t sync );
|
||||||
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data );
|
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data );
|
||||||
void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer );
|
void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer );
|
||||||
|
|
||||||
@@ -45,8 +45,8 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
// (eg. from a timer interrupt).
|
// (eg. from a timer interrupt).
|
||||||
// Call this while idle (in between matrix scans).
|
// Call this while idle (in between matrix scans).
|
||||||
// If the buffer is dirty, it will update the driver with the buffer.
|
// If the buffer is dirty, it will update the driver with the buffer.
|
||||||
void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 );
|
void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index );
|
||||||
void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
|
void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index );
|
||||||
|
|
||||||
#define A_1 0x00
|
#define A_1 0x00
|
||||||
#define A_2 0x01
|
#define A_2 0x01
|
||||||
|
|||||||
@@ -0,0 +1,239 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0A0C
|
||||||
|
#define DEVICE_VER 0x9999
|
||||||
|
#define MANUFACTURER di0ib
|
||||||
|
#define PRODUCT The nein Keyboard
|
||||||
|
#define DESCRIPTION 9 key macropad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 3
|
||||||
|
#define MATRIX_COLS 3
|
||||||
|
|
||||||
|
/* Keyboard Matrix Assignments */
|
||||||
|
#define DIRECT_PINS { \
|
||||||
|
{ F4, F5, F6 }, \
|
||||||
|
{ F7, B1, B3 }, \
|
||||||
|
{ B2, B6, B5 } \
|
||||||
|
}
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
// #define RGB_DI_PIN E2
|
||||||
|
// #ifdef RGB_DI_PIN
|
||||||
|
// #define RGBLED_NUM 16
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
// #define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define 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 */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "nein",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_ortho_3x3(
|
||||||
|
KC_MUTE, KC_HOME, KC_MPLY, \
|
||||||
|
MO(1), KC_UP, KC_END, \
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_ortho_3x3(
|
||||||
|
RESET, _______, KC_STOP, \
|
||||||
|
_______, _______, RGB_MOD, \
|
||||||
|
KC_MPRV, _______, KC_MNXT \
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "nein.h"
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_ortho_3x3( \
|
||||||
|
k00, k01, k02, \
|
||||||
|
k10, k11, k12, \
|
||||||
|
k20, k21, k22 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02 }, \
|
||||||
|
{ k10, k11, k12 }, \
|
||||||
|
{ k20, k21, k22 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# nein
|
||||||
|
|
||||||
|

|
||||||
|
===
|
||||||
|
|
||||||
|
A 9 key macropad.
|
||||||
|
|
||||||
|
Powered by a Pro Micro and can fit any of the various different sized variations of Pro Micro.
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Hardware Supported: nein PCB
|
||||||
|
Hardware Availability: [nein project on 40% Keyboards](https://www.40percent.club/2019/04/nein.html)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 40percentclub/nein:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
# MCU name
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# 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 = lite # 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 = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
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
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
@@ -19,6 +19,7 @@ void matrix_init_kb(void) {
|
|||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
// runs once when the firmware starts up
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
setPinOutput(E6);
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,5 +40,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
|
writePinLow(E6);
|
||||||
|
} else {
|
||||||
|
writePinHigh(E6);
|
||||||
|
}
|
||||||
|
|
||||||
led_set_user(usb_led);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "ErgoDox EZ",
|
"keyboard_name": "ErgoDox EZ",
|
||||||
"url": "ergodox-ez.com",
|
"url": "ergodox-ez.com",
|
||||||
"maintainer": "erez",
|
"maintainer": "ZSA",
|
||||||
"width": 17,
|
"width": 17,
|
||||||
"height": 8,
|
"height": 8,
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
Note for ErgoDox EZ customizers: Here be dragons!
|
|
||||||
This is not a file you want to be messing with.
|
|
||||||
All of the interesting stuff for you is under keymaps/ :)
|
|
||||||
Love, Erez
|
|
||||||
|
|
||||||
Copyright 2013 Oleg Kostyuk <[email protected]>
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
Note for ErgoDox EZ customizers: Here be dragons!
|
|
||||||
This is not a file you want to be messing with.
|
|
||||||
All of the interesting stuff for you is under keymaps/ :)
|
|
||||||
Love, Erez
|
|
||||||
|
|
||||||
Copyright 2013 Oleg Kostyuk <[email protected]>
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
Note for ErgoDox EZ customizers: Here be dragons!
|
|
||||||
This is not a file you want to be messing with.
|
|
||||||
All of the interesting stuff for you is under keymaps/ :)
|
|
||||||
Love, Erez
|
|
||||||
|
|
||||||
Copyright 2013 Oleg Kostyuk <[email protected]>
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
Note for ErgoDox EZ customizers: Here be dragons!
|
|
||||||
This is not a file you want to be messing with.
|
|
||||||
All of the interesting stuff for you is under keymaps/ :)
|
|
||||||
Love, Erez
|
|
||||||
|
|
||||||
Copyright 2013 Oleg Kostyuk <[email protected]>
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ The "column" and "row" in here actually refers to the opposite on the keyboard
|
|||||||
see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard
|
see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard
|
||||||
Nicolas
|
Nicolas
|
||||||
|
|
||||||
Note for ErgoDox EZ customizers: Here be dragons!
|
|
||||||
This is not a file you want to be messing with.
|
|
||||||
All of the interesting stuff for you is under keymaps/ :)
|
|
||||||
Love, Erez
|
|
||||||
|
|
||||||
Copyright 2013 Oleg Kostyuk <[email protected]>
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
Copyright 2013 Nicolas Poirey <[email protected]>
|
Copyright 2013 Nicolas Poirey <[email protected]>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x7983
|
||||||
|
#define PRODUCT_ID 0x0512
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Keycapsss
|
||||||
|
#define PRODUCT O4L:5x12
|
||||||
|
#define DESCRIPTION A 60 key ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2, F6, F5, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* WS2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 4
|
||||||
|
#define RGBLIGHT_SAT_STEP 4
|
||||||
|
#define RGBLIGHT_VAL_STEP 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
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum o4l5x12_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layers get their own keys. These are defined to make them not mess up
|
||||||
|
// the grid.
|
||||||
|
enum o4l5x12_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ESC | Q | W | E | R | T | Y | U | I | O | P | BSPC |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Alt | GUI |Lower | Enter | Space | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_ortho_5x12_2x2u(
|
||||||
|
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_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* |RGBPLA| { | [ | ( | | | ) | ] | } | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |RGBMOD| | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |UGlow | Reset| | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_ortho_5x12_2x2u(
|
||||||
|
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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL,
|
||||||
|
RGB_M_P, KC_LCBR, KC_LBRC, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, KC_PIPE,
|
||||||
|
RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
RGB_TOG, RESET, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum preonic_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layers get their own keys. These are defined to make them not mess up
|
||||||
|
// the grid.
|
||||||
|
enum preonic_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty (Preonic Layer Style)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_ortho_5x12(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower (Preonic Layer Style)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_ortho_5x12(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise (Preonic Layer Style)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_ortho_5x12(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise) (Preonic Layer Style)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT_ortho_5x12(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL,
|
||||||
|
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
|
||||||
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case 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;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "o4l_5x12.h"
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define XXX KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x12( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x12_1x2uC( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, XXX, k47, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x12_2x2u( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
|
k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \
|
||||||
|
{ k40, k41, k42, k43, k44, XXX, k46, XXX, k48, k49, k4a, k4b } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# O4L 5x12
|
||||||
|
|
||||||
|
A ortholinear 5x12 keyboard made and sold by Keycapsss. [More info at Keycapsss.com](https://keycapsss.com).
|
||||||
|
|
||||||
|
<img src="https://i.imgur.com/5p8rDme.jpg" height="500px">
|
||||||
|
|
||||||
|
## Features:
|
||||||
|
|
||||||
|
- MX and Choc switch support
|
||||||
|
- RGB Underglow (12x SK6812MINI)
|
||||||
|
- USB-C
|
||||||
|
- PCB shape, reset button and mounting holes position same as Preonic Rev3
|
||||||
|
- Pro Micro as controller
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Keyboard Maintainer: BenRoe [Github](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe)
|
||||||
|
- Hardware Supported: Pro Micro
|
||||||
|
- Hardware Availability: [Keycapsss.com](https://keycapsss.com)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Make firmware .hex for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make keycapsss/o4l_5x12:default
|
||||||
|
|
||||||
|
Example of flashing this keyboard (or use [QMK Toolbox](https://github.com/qmk/qmk_toolbox)):
|
||||||
|
|
||||||
|
make keycapsss/o4l_5x12:default:avrdude
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
# MCU name
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
|
LAYOUTS = ortho_5x12
|
||||||
@@ -21,15 +21,15 @@ Layout
|
|||||||
`-----------------------------------------------------------------------------------'
|
`-----------------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
|
||||||
Qwerty
|
Lower
|
||||||
,-----------------------------------------------------------------------------------.
|
,-----------------------------------------------------------------------------------.
|
||||||
| Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp |
|
| ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp |
|
||||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
| Tab | A | S | D | F | G | H | J | K | L | + | # |
|
| Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | € | ü | ? | ´ |
|
||||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
| Shift| Y | X | C | V | B | N | M | , | . | - |Enter |
|
| Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter |
|
||||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
| Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
| | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
`-----------------------------------------------------------------------------------'
|
`-----------------------------------------------------------------------------------'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+126
@@ -0,0 +1,126 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
|
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief PAL setup.
|
||||||
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
|
* This variable is used by the HAL when initializing the PAL driver.
|
||||||
|
*/
|
||||||
|
const PALConfig pal_default_config = {
|
||||||
|
#if STM32_HAS_GPIOA
|
||||||
|
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||||
|
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOB
|
||||||
|
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
||||||
|
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOC
|
||||||
|
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
||||||
|
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOD
|
||||||
|
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
||||||
|
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOE
|
||||||
|
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
||||||
|
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOF
|
||||||
|
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
||||||
|
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOG
|
||||||
|
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
||||||
|
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOH
|
||||||
|
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
||||||
|
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOI
|
||||||
|
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||||
|
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Early initialization code.
|
||||||
|
* @details This initialization must be performed just after stack setup
|
||||||
|
* and before any other initialization.
|
||||||
|
*/
|
||||||
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
|
stm32_clock_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if HAL_USE_SDC || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief SDC card detection.
|
||||||
|
*/
|
||||||
|
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
||||||
|
|
||||||
|
(void)sdcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SDC card write protection detection.
|
||||||
|
*/
|
||||||
|
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
||||||
|
|
||||||
|
(void)sdcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif /* HAL_USE_SDC */
|
||||||
|
|
||||||
|
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card write protection detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Board-specific initialization code.
|
||||||
|
* @todo Add your board-specific code, if any.
|
||||||
|
*/
|
||||||
|
void boardInit(void) {
|
||||||
|
}
|
||||||
+1187
File diff suppressed because it is too large.
Load diff
+5
@@ -0,0 +1,5 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
/* Address for jumping to bootloader on STM32 chips. */
|
||||||
|
/* It is chip dependent, the correct number can be looked up here:
|
||||||
|
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
* This also requires a patch to chibios:
|
||||||
|
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
*/
|
||||||
|
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
|
||||||
Executable
+520
@@ -0,0 +1,520 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_FREQUENCY 100000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_TM TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMCORE TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_HEAP TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_DYNAMIC TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p chThdInit() API.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
Executable
+154
@@ -0,0 +1,154 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Yiancar
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x8968
|
||||||
|
#define PRODUCT_ID 0x4E4B
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Yiancar-Designs
|
||||||
|
#define PRODUCT NK65
|
||||||
|
#define DESCRIPTION A 65-percent, tool-free RGB keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 }
|
||||||
|
#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 }
|
||||||
|
// To enable debugger set A13 A14 -> A5 A7
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Backlight options */
|
||||||
|
|
||||||
|
#define RGB_BACKLIGHT_ENABLED 1
|
||||||
|
|
||||||
|
#define RGB_BACKLIGHT_NK65
|
||||||
|
|
||||||
|
// they aren't really used if RGB_BACKLIGHT_HS60 defined
|
||||||
|
#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0
|
||||||
|
#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
|
||||||
|
#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0
|
||||||
|
#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0
|
||||||
|
#define RGB_BACKLIGHT_USE_ISO_ENTER 0
|
||||||
|
#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0
|
||||||
|
|
||||||
|
// disable backlight when USB suspended (PC sleep/hibernate/shutdown)
|
||||||
|
#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
|
||||||
|
|
||||||
|
// disable backlight after timeout in minutes, 0 = no timeout
|
||||||
|
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
|
||||||
|
|
||||||
|
// the default brightness
|
||||||
|
#define RGB_BACKLIGHT_BRIGHTNESS 255
|
||||||
|
|
||||||
|
// the default effect (RGB test)
|
||||||
|
#define RGB_BACKLIGHT_EFFECT 255
|
||||||
|
|
||||||
|
// the default effect speed (0-3)
|
||||||
|
#define RGB_BACKLIGHT_EFFECT_SPEED 0
|
||||||
|
|
||||||
|
// the default color1 and color2
|
||||||
|
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
|
||||||
|
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
|
||||||
|
|
||||||
|
#define DRIVER_COUNT 2
|
||||||
|
#define DRIVER_LED_TOTAL 128
|
||||||
|
|
||||||
|
// These define which keys in the matrix are alphas/mods
|
||||||
|
// Used for backlight effects so colors are different for
|
||||||
|
// alphas vs. mods
|
||||||
|
// Each value is for a row, bit 0 is column 0
|
||||||
|
// Alpha=0 Mod=1
|
||||||
|
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001
|
||||||
|
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001
|
||||||
|
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001
|
||||||
|
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
|
||||||
|
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111
|
||||||
|
|
||||||
|
#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
|
||||||
|
#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
|
||||||
|
#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
|
||||||
|
#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
|
||||||
|
|
||||||
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
|
#define EEPROM_MAGIC 0x451F
|
||||||
|
#define EEPROM_MAGIC_ADDR 32
|
||||||
|
// Bump this every time we change what we store
|
||||||
|
// This will automatically reset the EEPROM with defaults
|
||||||
|
// and avoid loading invalid data from the EEPROM
|
||||||
|
#define EEPROM_VERSION 0x08
|
||||||
|
#define EEPROM_VERSION_ADDR 34
|
||||||
|
|
||||||
|
// Backlight config starts after EEPROM version
|
||||||
|
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
|
||||||
|
// Dynamic keymap starts after backlight config (35+32)
|
||||||
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 67
|
||||||
|
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||||
|
// Dynamic macro starts after dynamic keymaps (67+(4*5*15*2)) = (67+600)
|
||||||
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 667
|
||||||
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398
|
||||||
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
Executable
+388
@@ -0,0 +1,388 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HALCONF_H
|
||||||
|
#define HALCONF_H
|
||||||
|
|
||||||
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PAL TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ADC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CAN FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_DAC TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the EXT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_EXT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_GPT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2C TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2S FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ICU FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MMC_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PWM FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the QSPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_QSPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_RTC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SDC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL_USB TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_UART FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_USB TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WDG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_ZERO_COPY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define MMC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_RETRY 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_MMC_SUPPORT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 16 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 256 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB number of buffers.
|
||||||
|
* @note The default is 2 buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* UART driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_WAIT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define USB_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* HALCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "NK65",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "yiancar",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Page Down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright 2019 Yiancar
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_65_ansi( /* Base */
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,\
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[1] = LAYOUT_65_ansi( /* FN */
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
//user initialization
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
//user matrix
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
The default keymap for NK65. VIA support disabled.
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Default layer is normal ANSI 65%
|
||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright 2019 Yiancar
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_65_ansi( /* Base */
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,\
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[1] = LAYOUT_65_ansi( /* FN */
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
//user initialization
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
//user matrix
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
The default keymap for NK65. VIA support enabled.
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Default layer is normal ANSI 65%
|
||||||
Executable
+67
@@ -0,0 +1,67 @@
|
|||||||
|
# project specific files
|
||||||
|
SRC = keyboards/zeal60/zeal60.c \
|
||||||
|
keyboards/zeal60/rgb_backlight.c \
|
||||||
|
drivers/issi/is31fl3733.c \
|
||||||
|
quantum/color.c \
|
||||||
|
drivers/arm/i2c_master.c
|
||||||
|
|
||||||
|
## chip/board settings
|
||||||
|
# the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32F3xx
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <this_dir>/ld/
|
||||||
|
MCU_LDSCRIPT = STM32F303xC
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP = stm32f3xx
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||||
|
# or <this_dir>/boards
|
||||||
|
BOARD = GENERIC_STM32_F303XC
|
||||||
|
|
||||||
|
# Cortex version
|
||||||
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 7
|
||||||
|
|
||||||
|
USE_FPU = yes
|
||||||
|
|
||||||
|
# Vector table for application
|
||||||
|
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||||
|
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||||
|
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||||
|
OPT_DEFS =
|
||||||
|
|
||||||
|
# Do not put the microcontroller into power saving mode
|
||||||
|
# when we get USB suspend event. We want it to keep updating
|
||||||
|
# backlight effects.
|
||||||
|
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
|
||||||
|
|
||||||
|
# Options to pass to dfu-util when flashing
|
||||||
|
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||||
|
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
|
||||||
|
#SERIAL_LINK_ENABLE = yes
|
||||||
|
|
||||||
|
RAW_ENABLE = yes
|
||||||
|
DYNAMIC_KEYMAP_ENABLE = yes
|
||||||
|
CIE1931_CURVE = yes
|
||||||
Executable
+257
@@ -0,0 +1,257 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MCUCONF_H
|
||||||
|
#define MCUCONF_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* STM32F3xx drivers configuration.
|
||||||
|
* The following settings override the default settings present in
|
||||||
|
* the various device driver implementation headers.
|
||||||
|
* Note that the settings for each driver only have effect if the whole
|
||||||
|
* driver is enabled in halconf.h.
|
||||||
|
*
|
||||||
|
* IRQ priorities:
|
||||||
|
* 15...0 Lowest...Highest.
|
||||||
|
*
|
||||||
|
* DMA priorities:
|
||||||
|
* 0...3 Lowest...Highest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STM32F3xx_MCUCONF
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_NO_INIT FALSE
|
||||||
|
#define STM32_PVD_ENABLE FALSE
|
||||||
|
#define STM32_PLS STM32_PLS_LEV0
|
||||||
|
#define STM32_HSI_ENABLED TRUE
|
||||||
|
#define STM32_LSI_ENABLED TRUE
|
||||||
|
#define STM32_HSE_ENABLED TRUE
|
||||||
|
#define STM32_LSE_ENABLED FALSE
|
||||||
|
#define STM32_SW STM32_SW_PLL
|
||||||
|
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||||
|
#define STM32_PREDIV_VALUE 1
|
||||||
|
#define STM32_PLLMUL_VALUE 9
|
||||||
|
#define STM32_HPRE STM32_HPRE_DIV1
|
||||||
|
#define STM32_PPRE1 STM32_PPRE1_DIV2
|
||||||
|
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
||||||
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||||
|
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
|
||||||
|
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
|
||||||
|
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||||
|
#define STM32_USART2SW STM32_USART2SW_PCLK
|
||||||
|
#define STM32_USART3SW STM32_USART3SW_PCLK
|
||||||
|
#define STM32_UART4SW STM32_UART4SW_PCLK
|
||||||
|
#define STM32_UART5SW STM32_UART5SW_PCLK
|
||||||
|
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
|
||||||
|
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
|
||||||
|
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
|
||||||
|
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
|
||||||
|
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||||
|
#define STM32_USB_CLOCK_REQUIRED TRUE
|
||||||
|
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||||||
|
|
||||||
|
#undef STM32_HSE_BYPASS
|
||||||
|
// #error "oh no"
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ADC_DUAL_MODE FALSE
|
||||||
|
#define STM32_ADC_COMPACT_SAMPLES FALSE
|
||||||
|
#define STM32_ADC_USE_ADC1 FALSE
|
||||||
|
#define STM32_ADC_USE_ADC2 FALSE
|
||||||
|
#define STM32_ADC_USE_ADC3 FALSE
|
||||||
|
#define STM32_ADC_USE_ADC4 FALSE
|
||||||
|
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
|
||||||
|
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||||
|
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||||
|
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||||
|
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC2_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC3_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC4_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||||
|
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CAN driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_CAN_USE_CAN1 FALSE
|
||||||
|
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DAC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_DAC_DUAL_MODE FALSE
|
||||||
|
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||||
|
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||||
|
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
||||||
|
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
|
||||||
|
#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_GPT_USE_TIM1 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM2 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM3 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM4 TRUE
|
||||||
|
#define STM32_GPT_USE_TIM6 TRUE
|
||||||
|
#define STM32_GPT_USE_TIM7 TRUE
|
||||||
|
#define STM32_GPT_USE_TIM8 TRUE
|
||||||
|
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
|
||||||
|
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
#define STM32_I2C_USE_I2C2 FALSE
|
||||||
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||||
|
#define STM32_I2C_I2C1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_I2C_USE_DMA TRUE
|
||||||
|
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ICU driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ICU_USE_TIM1 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM2 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM3 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM4 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM8 FALSE
|
||||||
|
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
|
||||||
|
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PWM driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_PWM_USE_ADVANCED FALSE
|
||||||
|
#define STM32_PWM_USE_TIM1 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM2 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM3 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM4 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM8 FALSE
|
||||||
|
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SERIAL_USE_USART1 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART2 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART3 FALSE
|
||||||
|
#define STM32_SERIAL_USE_UART4 FALSE
|
||||||
|
#define STM32_SERIAL_USE_UART5 FALSE
|
||||||
|
#define STM32_SERIAL_USART1_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_USART2_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_USART3_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_UART4_PRIORITY 12
|
||||||
|
#define STM32_SERIAL_UART5_PRIORITY 12
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SPI_USE_SPI1 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI2 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI3 FALSE
|
||||||
|
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI3_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ST driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ST_IRQ_PRIORITY 8
|
||||||
|
#define STM32_ST_USE_TIMER 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UART driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_UART_USE_USART1 FALSE
|
||||||
|
#define STM32_UART_USE_USART2 FALSE
|
||||||
|
#define STM32_UART_USE_USART3 FALSE
|
||||||
|
#define STM32_UART_USART1_IRQ_PRIORITY 12
|
||||||
|
#define STM32_UART_USART2_IRQ_PRIORITY 12
|
||||||
|
#define STM32_UART_USART3_IRQ_PRIORITY 12
|
||||||
|
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_USB_USE_USB1 TRUE
|
||||||
|
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||||
|
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
|
||||||
|
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WDG driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_WDG_USE_IWDG FALSE
|
||||||
|
|
||||||
|
#endif /* MCUCONF_H */
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
/* Copyright 2019 Yiancar
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef RGB_BACKLIGHT_NK65
|
||||||
|
#error RGB_BACKLIGHT_NK65 not defined, recheck config.h
|
||||||
|
#endif
|
||||||
Executable
+38
@@ -0,0 +1,38 @@
|
|||||||
|
/* Copyright 2019 Yiancar
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define XXX KC_NO
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "../zeal60/rgb_backlight_keycodes.h"
|
||||||
|
#include "../zeal60/zeal60_keycodes.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
|
||||||
|
#define LAYOUT_65_ansi( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
|
||||||
|
K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
|
||||||
|
{ K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
|
||||||
|
{ K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \
|
||||||
|
}
|
||||||
Executable
+37
@@ -0,0 +1,37 @@
|
|||||||
|
NK65
|
||||||
|
=========
|
||||||
|
|
||||||
|
[NK65]()
|
||||||
|
|
||||||
|
This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
|
||||||
|
Hardware Supported: A 65% keyboard with STM32F303CC
|
||||||
|
Hardware Availability: https://novelkeys.xyz/
|
||||||
|
|
||||||
|
Due to the RGB implementation, the NK65 is currently not compatible with community layouts.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make nk65:default_via
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
### Reset
|
||||||
|
|
||||||
|
- Unplug
|
||||||
|
- Hold Escape
|
||||||
|
- Plug In
|
||||||
|
- Unplug
|
||||||
|
- Release Escape
|
||||||
|
|
||||||
|
### Flash
|
||||||
|
|
||||||
|
- Unplug
|
||||||
|
- Hold Escape
|
||||||
|
- Plug In
|
||||||
|
- Flash using QMK Toolbox or dfu-util (`make nk65:<keymap>:dfu-util`)
|
||||||
Executable
+69
@@ -0,0 +1,69 @@
|
|||||||
|
# project specific files
|
||||||
|
SRC = keyboards/zeal60/zeal60.c \
|
||||||
|
keyboards/zeal60/rgb_backlight.c \
|
||||||
|
drivers/issi/is31fl3733.c \
|
||||||
|
quantum/color.c \
|
||||||
|
drivers/arm/i2c_master.c
|
||||||
|
|
||||||
|
## chip/board settings
|
||||||
|
# the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32F3xx
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <this_dir>/ld/
|
||||||
|
MCU_LDSCRIPT = STM32F303xC
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP = stm32f3xx
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||||
|
# or <this_dir>/boards
|
||||||
|
BOARD = GENERIC_STM32_F303XC
|
||||||
|
|
||||||
|
# Cortex version
|
||||||
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 7
|
||||||
|
|
||||||
|
USE_FPU = yes
|
||||||
|
|
||||||
|
# Vector table for application
|
||||||
|
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||||
|
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||||
|
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||||
|
OPT_DEFS =
|
||||||
|
|
||||||
|
# Do not put the microcontroller into power saving mode
|
||||||
|
# when we get USB suspend event. We want it to keep updating
|
||||||
|
# backlight effects.
|
||||||
|
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
|
||||||
|
|
||||||
|
# Options to pass to dfu-util when flashing
|
||||||
|
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||||
|
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
|
||||||
|
#SERIAL_LINK_ENABLE = yes
|
||||||
|
|
||||||
|
RAW_ENABLE = no
|
||||||
|
DYNAMIC_KEYMAP_ENABLE = no
|
||||||
|
CIE1931_CURVE = yes
|
||||||
|
|
||||||
|
LAYOUTS = 65_ansi
|
||||||
+7
-8
@@ -3,8 +3,6 @@ QMK runs on a diverse range of keyboards. Some of these keyboards are officially
|
|||||||
|
|
||||||
## Official QMK Keyboards
|
## Official QMK Keyboards
|
||||||
|
|
||||||
These keyboards are manufactured by the maintainers of QMK.
|
|
||||||
|
|
||||||
### Ortholinear Keyboards - Jack Humbert
|
### Ortholinear Keyboards - Jack Humbert
|
||||||
|
|
||||||
What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and killer tactile feel. These are available through [olkb.com](http://olkb.com) as well as through [Massdrop](http://massdrop.com) from time to time, as easy to assemble kits.
|
What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and killer tactile feel. These are available through [olkb.com](http://olkb.com) as well as through [Massdrop](http://massdrop.com) from time to time, as easy to assemble kits.
|
||||||
@@ -13,12 +11,6 @@ What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and
|
|||||||
* [Preonic](/keyboards/preonic/) — Like the Planck, but bigger. 50%.
|
* [Preonic](/keyboards/preonic/) — Like the Planck, but bigger. 50%.
|
||||||
* [Atomic](/keyboards/atomic/) — Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard.
|
* [Atomic](/keyboards/atomic/) — Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard.
|
||||||
|
|
||||||
### ErgoDox EZ - Erez Zukerman
|
|
||||||
|
|
||||||
Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-assembled, premium ergonomic keyboard. Its split design allows you to place both halves shoulder width, and its custom-made wrist rests and tilt/tent kit make for incredibly comfortable typing. Available on [ergodox-ez.com](https://ergodox-ez.com).
|
|
||||||
|
|
||||||
* [ErgoDox EZ](/keyboards/ergodox_ez/) — Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types.
|
|
||||||
|
|
||||||
### Clueboard - Zach White
|
### Clueboard - Zach White
|
||||||
|
|
||||||
Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co)
|
Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co)
|
||||||
@@ -27,6 +19,13 @@ Designed and built in Felton, CA, Clueboards keyboard emphasize quality and loca
|
|||||||
* [Cluecard](/keyboards/clueboard/card/) — A small board to help you hack on QMK.
|
* [Cluecard](/keyboards/clueboard/card/) — A small board to help you hack on QMK.
|
||||||
* [Cluepad](/keyboards/clueboard/17/) — A mechanical numpad with QMK superpowers.
|
* [Cluepad](/keyboards/clueboard/17/) — A mechanical numpad with QMK superpowers.
|
||||||
|
|
||||||
|
### ErgoDox EZ and Planck EZ - ZSA Technology Labs
|
||||||
|
|
||||||
|
[ZSA Technology Labs](https://ergodox-ez.com) maintains its own [fork of QMK](https://github.com/zsa/qmk_firmware) which feeds its [configurator](https://configure.ergodox-ez.com), for stability and legal purposes. The ZSA boards are:
|
||||||
|
|
||||||
|
* [ErgoDox EZ](/keyboards/ergodox_ez/) — A powerful split mechanical keyboard.
|
||||||
|
* [Planck EZ](/keyboards/planck/ez) — A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine, which ships fully assembled with a two-year warranty.
|
||||||
|
|
||||||
|
|
||||||
## Community-supported QMK Keyboards
|
## Community-supported QMK Keyboards
|
||||||
|
|
||||||
|
|||||||
@@ -292,26 +292,22 @@
|
|||||||
{
|
{
|
||||||
"label": "k36",
|
"label": "k36",
|
||||||
"x": 6,
|
"x": 6,
|
||||||
"y": 4.5,
|
"y": 4.5
|
||||||
"h": 2
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "k26",
|
"label": "k26",
|
||||||
"x": 7,
|
"x": 7,
|
||||||
"y": 4.5,
|
"y": 4.5
|
||||||
"h": 2
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "k76",
|
"label": "k76",
|
||||||
"x": 9,
|
"x": 9,
|
||||||
"y": 4.5,
|
"y": 4.5
|
||||||
"h": 2
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "k86",
|
"label": "k86",
|
||||||
"x": 10,
|
"x": 10,
|
||||||
"y": 4.5,
|
"y": 4.5
|
||||||
"h": 2
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "k94",
|
"label": "k94",
|
||||||
@@ -338,6 +334,26 @@
|
|||||||
"x": 15.5,
|
"x": 15.5,
|
||||||
"y": 4,
|
"y": 4,
|
||||||
"w": 1.5
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "k45",
|
||||||
|
"x": 6,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "k46",
|
||||||
|
"x": 7,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "k96",
|
||||||
|
"x": 9,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "k95",
|
||||||
|
"x": 10,
|
||||||
|
"y": 5.5
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,240 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x3941
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Kagizaraya
|
||||||
|
#define PRODUCT Scythe
|
||||||
|
#define DESCRIPTION Yet another 60% split keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5 }
|
||||||
|
#define MATRIX_COL_PINS { D6, D7, B4, B5, B6, C6, C7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define SOFT_SERIAL_PIN D0
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
#define RGBLIGHT_SPLIT 1
|
||||||
|
#define RGB_DI_PIN F0
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 9
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
|
|
||||||
|
/* Serial settings */
|
||||||
|
#define USE_SERIAL
|
||||||
|
//#define EE_HANDS
|
||||||
|
#define I2C_MASTER_LEFT
|
||||||
|
//#define I2C_MASTER_RIGHT
|
||||||
|
|
||||||
|
#define TAPPING_TERM 120
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Scythe",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "ka2hiro",
|
||||||
|
"width": 19,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"Esc", "x":2, "y":0}, {"label":"1", "x":3, "y":0}, {"label":"2", "x":4, "y":0}, {"label":"3", "x":5, "y":0}, {"label":"4", "x":6, "y":0}, {"label":"5", "x":7, "y":0}, {"label":"_", "x":8, "y":0}, {"label":"+", "x":9.5, "y":0}, {"label":"6", "x":10.5, "y":0}, {"label":"7", "x":11.5, "y":0}, {"label":"8", "x":12.5, "y":0}, {"label":"9", "x":13.5, "y":0}, {"label":"0", "x":14.5, "y":0}, {"label":"\\", "x":15.5, "y":0}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"{", "x":7.75, "y":1}, {"label":"}", "x":9.75, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"Backace", "x":15.75, "y":1, "w":1.5}, {"label":"Control", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"~", "x":7.5, "y":2}, {"label":"\"", "x":10, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"Return", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"Caps", "x":7.25, "y":3}, {"label":"Del", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"Shift", "x":16.25, "y":3, "w":1.75}, {"label":"Fn", "x":18, "y":3}, {"label":"", "x":2.75, "y":4, "w":1.25}, {"label":"", "x":4, "y":4, "w":1.25}, {"label":"Fn", "x":5.25, "y":4, "w":1.25}, {"x":6.5, "y":4, "w":2}, {"x":10, "y":4, "w":2}, {"label":"Fn", "x":12, "y":4, "w":1.25}, {"label":"", "x":13.25, "y":4, "w":1.25}, {"label":"", "x":14.5, "y":4, "w":1.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum layer_names {
|
||||||
|
_QWERTY,
|
||||||
|
_HAPPY,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
HAPPY,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | \ |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | BkSp |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | A | S | D | F | G | ` | | ' | H | J | K | L | ; |Enter |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------.
|
||||||
|
* |Shift | Z | X | C | V | B | Caps | | Del | N | M | , | . | / |Shift | Fn |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | LAlt | LGUI | Fn | Space| |Space | Fn | LGUI | LAlt |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_GRV, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HAPPY),
|
||||||
|
KC_LALT, KC_LGUI, MO(_HAPPY), KC_SPC, KC_SPC, MO(_HAPPY), KC_RGUI, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Happy
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | Pwr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Caps | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | Psc | Slk | Pus | Up | Ins |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | Vol- | Vol+ | Mute |RGBHUI|RGBSAI|RGBVAI| | * | / | Home | PgUp | Left | Right| |
|
||||||
|
* |------+------+------+------+------+------+------| +------+------+------+------+------+------+------+------.
|
||||||
|
* | |RGBTOG|RGBMOD|RGBRMD|RGBHUD|RGBSAD|RGBVAD| | + | - | End | PgDn | Down | | | |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_HAPPY] = LAYOUT(
|
||||||
|
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||||
|
KC_CAPS, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS,
|
||||||
|
_______, KC_VOLD, KC_VOLU, KC_MUTE, RGB_HUI, RGB_SAI, RGB_VAI, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The default keymap for scythe
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,205 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum layer_names {
|
||||||
|
_QWERTY,
|
||||||
|
_HAPPY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
HAPPY,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | \ |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | BkSp |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | A | S | D | F | G | ` | | ' | H | J | K | L | ; |Enter |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------.
|
||||||
|
* |Shift | Z | X | C | V | B | Caps | | Del | N | M | , | . | / |Shift | Fn |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | LAlt | LGUI | LOWER|Ctr/Esc| |Spc/Sft | RAISE| LGUI | LAlt |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_GRV, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, HAPPY,
|
||||||
|
KC_LALT, KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), MT(MOD_LSFT, KC_SPC), RAISE, KC_RGUI, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Happy
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | Pwr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | Caps | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | Psc | Slk | Pus | Up | Ins |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | Vol- | Vol+ | Mute |RGBHUI|RGBSAI|RGBVAI| | * | / | Home | PgUp | Left | Right| |
|
||||||
|
* |------+------+------+------+------+------+------| +------+------+------+------+------+------+------+------.
|
||||||
|
* | |RGBTOG|RGBMOD|RGBRMD|RGBHUD|RGBSAD|RGBVAD| | + | - | End | PgDn | Down | | | |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_HAPPY] = LAYOUT(
|
||||||
|
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||||
|
KC_CAPS, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS,
|
||||||
|
_______, KC_VOLD, KC_VOLU, KC_MUTE, RGB_HUI, RGB_SAI, RGB_VAI, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | _ | + | | | ~ | | | | : | " | > | { | } | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------.
|
||||||
|
* | | | - | = | \ | ` | | | | ; | ' | < | [ | ] | | |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, _______, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, _______,
|
||||||
|
_______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | Enter| | | Left | Down | Up | Right| | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------.
|
||||||
|
* | | | | | | | Del | | BkSp | | PgUp | PgDn | | | | |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_DEL, KC_BSPC, _______, KC_PGUP, KC_PGDN, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* Adjust
|
||||||
|
*
|
||||||
|
* ,------------------------------------------------. ,------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
* | | | |RGBMOD|RGBHUI|RGBSAI|RGBVAI| | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------.
|
||||||
|
* | | Reset| |RGBTOG|RGBHUD|RGBSAD|RGBVAD| | | Prev | Next | Vol- | Vol+ | Play | | |
|
||||||
|
* `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------'
|
||||||
|
* | | | | | | | | | |
|
||||||
|
* `---------------------------' `---------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||||
|
_______, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, RESET, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case HAPPY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_HAPPY);
|
||||||
|
} else {
|
||||||
|
layer_off(_HAPPY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The forty percent compatible keymap for scythe
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Scythe
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Yet another 60% symmetrical split keyboard.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro)
|
||||||
|
Hardware Supported: Scythe PCB, ATMEGA32U4
|
||||||
|
Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make scythe:default:dfu
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# 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 = lite # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # 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 = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
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
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
|
SPLIT_KEYBOARD = yes # Use shared split_common
|
||||||
|
RGBLIGHT_SPLIT = yes
|
||||||
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 "scythe.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,51 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
L01, L02, L03, L04, L05, L06, L07, R01, R02, R03, R04, R05, R06, R07, \
|
||||||
|
L08, L09, L10, L11, L12, L13, L14, R08, R09, R10, R11, R12, R13, R14, \
|
||||||
|
L15, L16, L17, L18, L19, L20, L21, R15, R16, R17, R18, R19, R20, R21, \
|
||||||
|
L22, L23, L24, L25, L26, L27, L28, R22, R23, R24, R25, R26, R27, R28, R33, \
|
||||||
|
L29, L30, L31, L32, R29, R30, R31, R32 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L01, L02, L03, L04, L05, L06, L07 }, \
|
||||||
|
{ L08, L09, L10, L11, L12, L13, L14 }, \
|
||||||
|
{ L15, L16, L17, L18, L19, L20, L21 }, \
|
||||||
|
{ L22, L23, L24, L25, L26, L27, L28 }, \
|
||||||
|
{ L29, L30, L31, L32, ___, ___, ___ }, \
|
||||||
|
{ R01, R02, R03, R04, R05, R06, R07 }, \
|
||||||
|
{ R08, R09, R10, R11, R12, R13, R14 }, \
|
||||||
|
{ R15, R16, R17, R18, R19, R20, R21 }, \
|
||||||
|
{ R22, R23, R24, R25, R26, R27, R28 }, \
|
||||||
|
{ R29, R30, R31, R32, ___, ___, R33 } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
Note for ErgoDox EZ customizers: Here be dragons!
|
|
||||||
This is not a file you want to be messing with.
|
|
||||||
All of the interesting stuff for you is under keymaps/ :)
|
|
||||||
Love, Erez
|
|
||||||
|
|
||||||
Copyright 2013 Oleg Kostyuk <[email protected]>
|
Copyright 2013 Oleg Kostyuk <[email protected]>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+1561
-1329
File diff suppressed because it is too large.
Load diff
@@ -1,13 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include QMK_KEYBOARD_CONFIG_H
|
|
||||||
|
|
||||||
#define ONESHOT_TAP_TOGGLE 2
|
|
||||||
#define ONESHOT_TIMEOUT 300
|
|
||||||
|
|
||||||
#undef LEADER_TIMEOUT
|
|
||||||
#define LEADER_TIMEOUT 300
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
#include <keymap_extras/keymap_colemak.h>
|
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
#include "debug.h"
|
|
||||||
#include "action_layer.h"
|
|
||||||
|
|
||||||
#define BASE 0 // default layer
|
|
||||||
#define SYMB 1 // symbols
|
|
||||||
#define MDIA 2 // media keys
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
|
||||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
|
||||||
RGB_FF00BB // always start with RGB_
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
/* Keymap 0: Basic layer
|
|
||||||
*
|
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
|
||||||
* | = | 1 | 2 | 3 | 4 | 5 |Ctrl- | | Ctrl+| 6 | 7 | 8 | 9 | 0 | - |
|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
|
||||||
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
||||||
* | BkSp | A | S | D | F | G |------| |------| H | Alt/J| K | L |; / L2| LGui/' |
|
|
||||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
|
||||||
* |LShift/(|Z/Ctrl| X | C | V | B | [ | | ] | N | M | , | . |//Ctrl|RShift/)|
|
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
|
||||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | -/L1 |
|
|
||||||
* `----------------------------------' `----------------------------------'
|
|
||||||
* ,-------------. ,-------------.
|
|
||||||
* | App | LGui | | Alt |Ctrl/Esc|
|
|
||||||
* ,------|------|------| |------+--------+------.
|
|
||||||
* | | | Home | | PgUp | | |
|
|
||||||
* | Space|Leader|------| |------| Tab/L1 |Enter |
|
|
||||||
* | | | End | | PgDn | | |
|
|
||||||
* `--------------------' `----------------------'
|
|
||||||
*/
|
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
|
||||||
// Otherwise, it needs KC_*
|
|
||||||
[BASE] = LAYOUT_ergodox( // layer 0 : default
|
|
||||||
// left hand
|
|
||||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS),
|
|
||||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
|
||||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
|
||||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC),
|
|
||||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
|
|
||||||
ALT_T(KC_APP), KC_LGUI,
|
|
||||||
KC_HOME,
|
|
||||||
KC_SPC,KC_LEAD,KC_END,
|
|
||||||
// right hand
|
|
||||||
LCTL(KC_EQL), KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
|
||||||
TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
|
||||||
KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT),
|
|
||||||
MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,
|
|
||||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, LT(SYMB,KC_MINS),
|
|
||||||
KC_LALT, CTL_T(KC_ESC),
|
|
||||||
KC_PGUP,
|
|
||||||
KC_PGDN,LT(SYMB, KC_TAB), KC_ENT
|
|
||||||
),
|
|
||||||
/* Keymap 1: Symbol Layer
|
|
||||||
*
|
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
|
||||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
|
||||||
* | | | | | | | | | | | | | | | F12 |
|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
||||||
* | | 1 | 2 | 3 | 4 | 5 |------| |------| & | _ | - | ; | + | |
|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
||||||
* | | 6 | 7 | 8 | 9 | 0 | | | | | | @ | = | % | | |
|
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
|
||||||
* | | | |NxtTab|PrvTab| | | | | | |
|
|
||||||
* `----------------------------------' `----------------------------------'
|
|
||||||
* ,-------------. ,-------------.
|
|
||||||
* | | | |TOG |
|
|
||||||
* ,------|------|------| |------+------+------.
|
|
||||||
* |VAI |VAD |HUI | |SAI | |MOD |
|
|
||||||
* | | |------| |------| | |
|
|
||||||
* | | |HUD | |SAD | | |
|
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*/
|
|
||||||
// SYMBOLS
|
|
||||||
[SYMB] = LAYOUT_ergodox(
|
|
||||||
// left hand
|
|
||||||
RGB_FF00BB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5,
|
|
||||||
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN),
|
|
||||||
KC_TRNS,KC_TRNS,
|
|
||||||
RGB_HUI,
|
|
||||||
RGB_VAI,RGB_VAD,RGB_HUD,
|
|
||||||
// right hand
|
|
||||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
|
|
||||||
KC_AMPR, KC_UNDS, KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_PIPE, KC_AT, KC_EQL, KC_PERC, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
RGB_TOG, KC_TRNS,
|
|
||||||
RGB_SAI,
|
|
||||||
RGB_SAD, KC_TRNS, RGB_MOD
|
|
||||||
),
|
|
||||||
/* Keymap 2: Media and mouse keys
|
|
||||||
*
|
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
|
||||||
* | | | | | | | | | | | | | | | |
|
|
||||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
|
||||||
* | | | | | | | | | | | | | | | |
|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
||||||
* | | PgUp | Home | End | PgDn | |------| |------| | | | | | Play |
|
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
|
||||||
* | | | | | | | | | | | | Prev | Next | | |
|
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
|
||||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
|
||||||
* `----------------------------------' `----------------------------------'
|
|
||||||
* ,-------------. ,-------------.
|
|
||||||
* | | | | | |
|
|
||||||
* ,------|------|------| |------+------+------.
|
|
||||||
* | | | | | | |Brwser|
|
|
||||||
* | | |------| |------| |Back |
|
|
||||||
* | | | | | | | |
|
|
||||||
* `--------------------' `--------------------'
|
|
||||||
*/
|
|
||||||
// MEDIA AND MOUSE
|
|
||||||
[MDIA] = LAYOUT_ergodox(
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
// right hand
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
|
||||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_WBAK
|
|
||||||
),
|
|
||||||
};
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
return MACRO_NONE;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Runs just one time when the keyboard initializes.
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
// dynamically generate these.
|
|
||||||
case RGB_FF00BB:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_enable();
|
|
||||||
rgblight_mode(1);
|
|
||||||
rgblight_setrgb(0xff,0x00,0xbb);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
LEADER_EXTERNS();
|
|
||||||
|
|
||||||
// Runs constantly in the background, in a loop.
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
uint8_t layer = biton32(layer_state);
|
|
||||||
|
|
||||||
ergodox_board_led_off();
|
|
||||||
ergodox_right_led_1_off();
|
|
||||||
ergodox_right_led_2_off();
|
|
||||||
ergodox_right_led_3_off();
|
|
||||||
switch (layer) {
|
|
||||||
// TODO: Make this relevant to the ErgoDox EZ.
|
|
||||||
case 1:
|
|
||||||
ergodox_right_led_1_on();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
ergodox_right_led_2_on();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// none
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
LEADER_DICTIONARY() {
|
|
||||||
leading = false;
|
|
||||||
leader_end();
|
|
||||||
|
|
||||||
SEQ_ONE_KEY(KC_W) {
|
|
||||||
register_code(KC_LALT);
|
|
||||||
register_code(KC_F4);
|
|
||||||
unregister_code(KC_F4);
|
|
||||||
unregister_code(KC_LALT);
|
|
||||||
}
|
|
||||||
SEQ_ONE_KEY(KC_O) {
|
|
||||||
register_code(KC_LCTL);
|
|
||||||
register_code(KC_LSFT);
|
|
||||||
register_code(KC_O);
|
|
||||||
unregister_code(KC_O);
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
unregister_code(KC_LCTL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
# Erez's experimental layout
|
|
||||||
|
|
||||||
This is my personal layout which I use to test out ideas which may or may not make it onto the default layout we ship with. It's based off the default layout, with various tweaks.
|
|
||||||
|
|
||||||
Changelog:
|
|
||||||
|
|
||||||
## Nov 1, 2016:
|
|
||||||
|
|
||||||
* Adds dedicated text zooming keys in inner corners
|
|
||||||
|
|
||||||
## May 24, 2016:
|
|
||||||
|
|
||||||
* Implements Leader key example
|
|
||||||
* Leader, W sends Alt-F4
|
|
||||||
* Leader, O sends Ctrl-shift-o (a shortcut I use in FrontApp)
|
|
||||||
|
|
||||||
## May 8, 2016:
|
|
||||||
|
|
||||||
* Makes bottom-right key send minus/underscore when tapped, L1 temporary toggle when held
|
|
||||||
* Tweaked the positions of the numbers on the symbol layer. Basically, 12345 are now directly under their number-row counterparts in layer 0. You can imagine pulling the number row down to the home row. And 67890 are directly under 12345 - so it's a matter of just adding 5 and going to the next row (1+5 = 6, 2+5 = 7 and so on).
|
|
||||||
* Tweaks media/nav layer
|
|
||||||
* Removes mouse control, as I don't use it
|
|
||||||
* Makes left home row keys PgUp, Home, End, PgDn
|
|
||||||
|
|
||||||
## Apr 29, 2016:
|
|
||||||
|
|
||||||
* Tweaks the Hyper and Meh key to send brackets when tapped
|
|
||||||
* Turns bottom-right key into a minus/underscore (easy to reach with the right pinky)
|
|
||||||
|
|
||||||
## Apr 25, 2016:
|
|
||||||
|
|
||||||
* Made it so that the right and left Shift keys send opening and closing parens ( ) when tapped
|
|
||||||
|
|
||||||
## Feb 11, 2016:
|
|
||||||
|
|
||||||
* Updated ASCII legend for thumb clusters
|
|
||||||
* Made it so outer left-hand thumb key is L1 momentary toggle
|
|
||||||
* Added % and @ to L1
|
|
||||||
* Swapped positions for _ and - on L1
|
|
||||||
|
|
||||||
## Feb 5, 2016:
|
|
||||||
|
|
||||||
* A whole new design for the symbol layer. Specifically:
|
|
||||||
* Put the minus, underscore, and semicolon right in the homerow for the right hand
|
|
||||||
* Parens are in better places for me
|
|
||||||
* The arrow keys now send Ctrl-PgUp and Ctrl-PgDn, for switching browser tabs with the arrows when in symbol layer
|
|
||||||
* Tab (right-hand outer thumb key) now does double duty to toggle symbol layer when held down
|
|
||||||
* Backspace (left-hand outer thumb key) now just toggles symbol layer (I wasn't using it as a backspace)
|
|
||||||
|
|
||||||
|
|
||||||
## Jan 19, 2016:
|
|
||||||
|
|
||||||
* Made J into dual-action key (Alt when held down), to make Alt-tab more ergonomic.
|
|
||||||
* Made ' into dual-action key (Win/Cmd when held down).
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Having a file like this allows you to override Makefile definitions
|
|
||||||
# for your own particular keymap
|
|
||||||
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
|
||||||
LEADER_ENABLE = yes
|
|
||||||
@@ -0,0 +1,694 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "layers.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
// Timer to detect tap/hold on NEO_RMOD3 key
|
||||||
|
static uint16_t neo3_timer;
|
||||||
|
// State bitmap to track which key(s) enabled NEO_3 layer
|
||||||
|
static uint8_t neo3_state = 0;
|
||||||
|
// State bitmap to track key combo for CAPSLOCK
|
||||||
|
static uint8_t capslock_state = 0;
|
||||||
|
|
||||||
|
// bitmasks for modifier keys
|
||||||
|
#define MOD_MASK_NONE 0
|
||||||
|
|
||||||
|
// Used to trigger macros / sequences of keypresses
|
||||||
|
enum custom_keycodes {
|
||||||
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
US_OSX_SMALL_UE,
|
||||||
|
US_OSX_SMALL_AE,
|
||||||
|
US_OSX_SMALL_OE,
|
||||||
|
US_OSX_CAPITAL_UE,
|
||||||
|
US_OSX_CAPITAL_AE,
|
||||||
|
US_OSX_CAPITAL_OE,
|
||||||
|
NEO2_LMOD3,
|
||||||
|
NEO2_RMOD3,
|
||||||
|
NEO2_1,
|
||||||
|
NEO2_2,
|
||||||
|
NEO2_3,
|
||||||
|
NEO2_4,
|
||||||
|
NEO2_5,
|
||||||
|
NEO2_6,
|
||||||
|
NEO2_7,
|
||||||
|
NEO2_8,
|
||||||
|
NEO2_9,
|
||||||
|
NEO2_0,
|
||||||
|
NEO2_MINUS,
|
||||||
|
NEO2_UE,
|
||||||
|
NEO2_AE,
|
||||||
|
NEO2_OE,
|
||||||
|
NEO2_COMMA,
|
||||||
|
NEO2_DOT,
|
||||||
|
NEO2_SHARP_S
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NEO2_LMOD4 TT(NEO_4)
|
||||||
|
#define NEO2_RMOD4 NEO2_LMOD4
|
||||||
|
|
||||||
|
// NEO_3 special characters
|
||||||
|
#define US_OSX_SUPERSCRIPT_1 KC_NO // ¹
|
||||||
|
#define US_OSX_SUPERSCRIPT_2 KC_NO // ²
|
||||||
|
#define US_OSX_SUPERSCRIPT_3 KC_NO // ³
|
||||||
|
#define US_OSX_RSAQUO LALT(LSFT(KC_4)) // ›
|
||||||
|
#define US_OSX_LSAQUO LALT(LSFT(KC_3)) // ‹
|
||||||
|
#define US_OSX_CENT LALT(KC_4) // ¢
|
||||||
|
#define US_OSX_YEN LALT(KC_Y) // ¥
|
||||||
|
#define US_OSX_SBQUO LALT(LSFT(KC_0)) // ‚
|
||||||
|
#define US_OSX_LEFT_SINGLE_QUOTE LALT(KC_RBRACKET) // ‘
|
||||||
|
#define US_OSX_RIGHT_SINGLE_QUOTE LALT(LSFT(KC_RBRACKET)) // ’
|
||||||
|
#define US_OSX_ELLIPSIS LALT(KC_SCOLON) // …
|
||||||
|
#define US_OSX_UNDERSCORE LSFT(KC_MINUS) // _
|
||||||
|
#define US_OSX_LBRACKET KC_LBRACKET // [
|
||||||
|
#define US_OSX_RBRACKET KC_RBRACKET // ]
|
||||||
|
#define US_OSX_CIRCUMFLEX LSFT(KC_6) // ^
|
||||||
|
#define US_OSX_EXCLAMATION LSFT(KC_1) // !
|
||||||
|
#define US_OSX_LESSTHAN LSFT(KC_COMMA) // <
|
||||||
|
#define US_OSX_GREATERTHAN LSFT(KC_DOT) // >
|
||||||
|
#define US_OSX_EQUAL KC_EQUAL // =
|
||||||
|
#define US_OSX_AMPERSAND LSFT(KC_7) // &
|
||||||
|
#define US_OSX_SMALL_LONG_S KC_NO // ſ
|
||||||
|
#define US_OSX_BSLASH KC_BSLASH
|
||||||
|
#define US_OSX_SLASH KC_SLASH // /
|
||||||
|
#define US_OSX_CLBRACKET LSFT(KC_LBRACKET) // {
|
||||||
|
#define US_OSX_CRBRACKET LSFT(KC_RBRACKET) // }
|
||||||
|
#define US_OSX_ASTERISK LSFT(KC_8) // *
|
||||||
|
#define US_OSX_QUESTIONMARK LSFT(KC_SLASH) // ?
|
||||||
|
#define US_OSX_LPARENTHESES LSFT(KC_9) // (
|
||||||
|
#define US_OSX_RPARENTHESES LSFT(KC_0) // )
|
||||||
|
#define US_OSX_HYPHEN_MINUS KC_MINUS // -
|
||||||
|
#define US_OSX_COLON LSFT(KC_SCOLON) // :
|
||||||
|
#define US_OSX_AT LSFT(KC_2) // @
|
||||||
|
#define US_OSX_HASH LSFT(KC_3) // #
|
||||||
|
#define US_OSX_PIPE LSFT(KC_BSLASH) // |
|
||||||
|
#define US_OSX_TILDE LSFT(KC_GRAVE) // ~
|
||||||
|
#define US_OSX_BACKTICK KC_GRAVE // `
|
||||||
|
#define US_OSX_PLUS LSFT(KC_EQUAL) // +
|
||||||
|
#define US_OSX_PERCENT LSFT(KC_5) // %
|
||||||
|
#define US_OSX_DOUBLE_QUOTE LSFT(KC_QUOTE) // "
|
||||||
|
#define US_OSX_SINGLE_QUOTE KC_QUOTE // '
|
||||||
|
#define US_OSX_SEMICOLON KC_SCOLON // ;
|
||||||
|
|
||||||
|
// NEO_4 special characters
|
||||||
|
#define US_OSX_FEMININE_ORDINAL LALT(KC_9) // ª
|
||||||
|
#define US_OSX_MASCULINE_ORDINAL LALT(KC_0) // º
|
||||||
|
#define US_OSX_NUMERO_SIGN KC_NO // №
|
||||||
|
#define US_OSX_MIDDLE_DOT LALT(LSFT(KC_9)) // ·
|
||||||
|
#define US_OSX_BRITISH_POUND LALT(KC_3) // £
|
||||||
|
#define US_OSX_CURRENCY_SIGN KC_NO // ¤
|
||||||
|
#define US_OSX_INV_EXCLAMATION LALT(KC_1) // ¡
|
||||||
|
#define US_OSX_INV_QUESTIONMARK LALT(LSFT(KC_SLASH)) // ¿
|
||||||
|
#define US_OSX_DOLLAR KC_DOLLAR // $
|
||||||
|
#define US_OSX_EM_DASH LALT(LSFT(KC_MINUS)) // —
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* NEO_1: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ---- | 1/° | 2/§ | 3/ | 4/» | 5/« | ESC | | US_1 | 6/$ | 7/€ | 8/„ | 9/“ | 0/” | -/— |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | TAB | X | V | L | C | W | LCTL | | RCTL | K | H | G | F | Q | ß |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | NEO_3 | U | I | A | E | O |------| |------| S | N | R | T | D | Y |
|
||||||
|
* |--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------|
|
||||||
|
* | LSHIFT | Ü | Ö | Ä | P | Z | | | | B | M | ,/– | ./• | J | RSHIFT |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | ---- | ---- | LCTL | LALT | LGUI | | RGUI | Left | Down | Up | Right|
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | FKEYS| Home | | PgUp | FKEYS|
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | Back-| | End | | PgDn | | |
|
||||||
|
* | space|Delete|------| |------| Enter|Space |
|
||||||
|
* | | | NEO_4| | NEO_4| | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[NEO_1] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_NO /* NOOP */, NEO2_1, NEO2_2, NEO2_3, NEO2_4, NEO2_5, KC_ESCAPE,
|
||||||
|
KC_TAB, KC_X, KC_V, KC_L, KC_C, KC_W, KC_LCTRL,
|
||||||
|
NEO2_LMOD3, KC_U, KC_I, KC_A, KC_E, KC_O, /* --- */
|
||||||
|
KC_LSHIFT, NEO2_UE, NEO2_OE, NEO2_AE, KC_P, KC_Z, KC_LALT,
|
||||||
|
KC_NO /* NOOP */, KC_NO /* NOOP */, KC_LCTRL, KC_LALT, KC_LGUI, /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ MO(FKEYS), KC_HOME,
|
||||||
|
/* KC_BSPACE */ /* KC_DELETE */ KC_END,
|
||||||
|
KC_BSPACE, KC_DELETE, NEO2_LMOD4,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
TO(US_1), NEO2_6, NEO2_7, NEO2_8, NEO2_9, NEO2_0, NEO2_MINUS,
|
||||||
|
KC_RCTRL, KC_K, KC_H, KC_G, KC_F, KC_Q, NEO2_SHARP_S,
|
||||||
|
/* --- */ KC_S, KC_N, KC_R, KC_T, KC_D, NEO2_RMOD3,
|
||||||
|
KC_RALT, KC_B, KC_M, NEO2_COMMA, NEO2_DOT, KC_J, KC_RSHIFT,
|
||||||
|
/* --- */ /* --- */ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
KC_PGUP, MO(FKEYS), /* --- */
|
||||||
|
KC_PGDOWN, /* --- */ /* --- */
|
||||||
|
NEO2_RMOD4, KC_ENTER, KC_SPACE
|
||||||
|
),
|
||||||
|
|
||||||
|
/* NEO_3: Symbol layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ---- | ---- | ---- | ---- | › | ‹ | | | | ¢ | ¥ | ‚ | ‘ | ’ | ---- |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ---- | … | _ | [ | ] | ^ | | | | ! | < | > | = | & | ---- |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | \ | / | { | } | * |------| |------| ? | ( | ) | - | : | @ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | | | ~ | ` | | | | + | % | " | ' | ; | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[NEO_3] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, US_OSX_RSAQUO, US_OSX_LSAQUO, _______,
|
||||||
|
KC_NO /* NOOP */, US_OSX_ELLIPSIS, US_OSX_UNDERSCORE, US_OSX_LBRACKET, US_OSX_RBRACKET, US_OSX_CIRCUMFLEX, _______,
|
||||||
|
_______, US_OSX_BSLASH, US_OSX_SLASH, US_OSX_CLBRACKET, US_OSX_CRBRACKET, US_OSX_ASTERISK, /* --- */
|
||||||
|
_______, US_OSX_HASH, US_OSX_DOLLAR, US_OSX_PIPE, US_OSX_TILDE, US_OSX_BACKTICK, _______,
|
||||||
|
_______, _______, _______, _______, _______, /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ _______, _______,
|
||||||
|
/* --- */ /* --- */ _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
_______, US_OSX_CENT, US_OSX_YEN, US_OSX_SBQUO, US_OSX_LEFT_SINGLE_QUOTE, US_OSX_RIGHT_SINGLE_QUOTE, KC_NO,
|
||||||
|
_______, US_OSX_EXCLAMATION, US_OSX_LESSTHAN, US_OSX_GREATERTHAN, US_OSX_EQUAL, US_OSX_AMPERSAND, US_OSX_SMALL_LONG_S,
|
||||||
|
/* --- */ US_OSX_QUESTIONMARK, US_OSX_LPARENTHESES, US_OSX_RPARENTHESES, US_OSX_HYPHEN_MINUS, US_OSX_COLON, NEO2_RMOD3,
|
||||||
|
_______, US_OSX_PLUS, US_OSX_PERCENT, US_OSX_DOUBLE_QUOTE, US_OSX_SINGLE_QUOTE, US_OSX_SEMICOLON, _______,
|
||||||
|
/* --- */ /* --- */ _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
_______, _______, /* --- */
|
||||||
|
_______, /* --- */ /* --- */
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* NEO_4: Cursor & Numpad
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ---- | ª | º | ---- | · | £ | | | | ---- | Tab | / | * | - | ---- |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ---- | PgUp | ⌫ | Up | ⌦ | PgDn | | | | ¡ | 7 | 8 | 9 | + | – |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | Home | Left | Down | Right| End |------| |------| ¿ | 4 | 5 | 6 | , | . |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | Esc | Tab | Ins |Return| ---- | | | | : | 1 | 2 | 3 | ; | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | 0 | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[NEO_4] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_NO /* NOOP */, US_OSX_FEMININE_ORDINAL, US_OSX_MASCULINE_ORDINAL, KC_NO /* NOOP */, US_OSX_MIDDLE_DOT, US_OSX_BRITISH_POUND, _______,
|
||||||
|
_______, KC_PGUP, KC_BSPACE, KC_UP, KC_DELETE, KC_PGDOWN, _______,
|
||||||
|
_______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, /* --- */
|
||||||
|
_______, KC_ESCAPE, KC_TAB, KC_INSERT, KC_ENTER, KC_NO /* NOOP */, _______,
|
||||||
|
_______, _______, _______, _______, _______, /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ _______, _______,
|
||||||
|
/* --- */ /* --- */ _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
_______, US_OSX_CURRENCY_SIGN, KC_TAB, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO /* NOOP */,
|
||||||
|
_______, US_OSX_INV_EXCLAMATION, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, US_OSX_EM_DASH,
|
||||||
|
/* --- */ US_OSX_INV_QUESTIONMARK, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_COMMA, KC_KP_DOT,
|
||||||
|
_______, US_OSX_COLON, KC_KP_1, KC_KP_2, KC_KP_3, US_OSX_SEMICOLON, _______,
|
||||||
|
/* --- */ /* --- */ _______, KC_KP_0, _______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
_______, _______, /* --- */
|
||||||
|
_______, /* --- */ /* --- */
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* NEO_5: Greek
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[NEO_5] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, /* --- */
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
_______, _______, _______, _______, _______, /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ _______, _______,
|
||||||
|
/* --- */ /* --- */ _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */,
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */,
|
||||||
|
/* --- */ KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */,
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
/* --- */ /* --- */ _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
_______, _______, /* --- */
|
||||||
|
_______, /* --- */ /* --- */
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* NEO_6: Math symbols
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[NEO_6] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, /* --- */
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
_______, _______, _______, _______, _______, /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ _______, _______,
|
||||||
|
/* --- */ /* --- */ _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */,
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */,
|
||||||
|
/* --- */ KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */,
|
||||||
|
_______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______,
|
||||||
|
/* --- */ /* --- */ _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
_______, _______, /* --- */
|
||||||
|
_______, /* --- */ /* --- */
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* US_1: US QWERTY
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | NEO_1| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | \ | Q | W | E | R | T | ---- | | [ | Y | U | I | O | P | ] |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||||
|
* |--------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | LGUI | ` | ---- | ---- | FKEYS| | Left | Down | Up | Right| RGUI |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | LCTRL| LALT | | RALT | RCTRL|
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | HOME | | PGUP | | |
|
||||||
|
* | BKSP | DEL |------| |------| ENTR | SPCE |
|
||||||
|
* | | | END | | PGDN | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[US_1] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESCAPE,
|
||||||
|
KC_BSLASH, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO /* NOOP */,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, /* --- */
|
||||||
|
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO /* NOOP */,
|
||||||
|
KC_LGUI, KC_GRAVE, KC_NO, KC_NO, MO(FKEYS), /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ KC_LCTRL, KC_LALT,
|
||||||
|
/* --- */ /* --- */ KC_HOME,
|
||||||
|
KC_BSPACE, KC_DELETE, KC_END,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
TO(NEO_1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||||
|
KC_LBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRACKET,
|
||||||
|
/* --- */ KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
|
||||||
|
KC_NO /* NOOP */, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT,
|
||||||
|
/* --- */ /* --- */ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RGUI,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
KC_RALT, KC_RCTRL, /* --- */
|
||||||
|
KC_PGUP, /* --- */ /* --- */
|
||||||
|
KC_PGDOWN, KC_ENTER, KC_SPACE
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FKEYS: Function keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | Prev | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | VolUp |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Play | | | | | | | | | | | | | | VolDn |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Next | | | | | |------| |------| | | | | | Mute |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[FKEYS] = LAYOUT_ergodox(
|
||||||
|
// left hand side - main
|
||||||
|
KC_MEDIA_REWIND, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||||
|
KC_MEDIA_PLAY_PAUSE, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_MEDIA_FAST_FORWARD, _______, _______, _______, _______, _______, /* --- */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, /* --- */ /* --- */
|
||||||
|
|
||||||
|
// left hand side - thumb cluster
|
||||||
|
/* --- */ _______, _______,
|
||||||
|
/* --- */ /* --- */ _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - main
|
||||||
|
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_AUDIO_VOL_UP,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_DOWN,
|
||||||
|
/* --- */ _______, _______, _______, _______, _______, KC_AUDIO_MUTE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
/* --- */ /* --- */ _______, _______, _______, _______, _______,
|
||||||
|
|
||||||
|
// right hand side - thumb cluster
|
||||||
|
_______, _______, /* --- */
|
||||||
|
_______, /* --- */ /* --- */
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Send a key tap with a optional set of modifiers.
|
||||||
|
void tap_with_modifiers(uint16_t keycode, uint8_t force_modifiers) {
|
||||||
|
uint8_t active_modifiers = get_mods();
|
||||||
|
|
||||||
|
if ((force_modifiers & MOD_MASK_SHIFT) && !(active_modifiers & MOD_MASK_SHIFT)) register_code(KC_LSFT);
|
||||||
|
if ((force_modifiers & MOD_MASK_CTRL) && !(active_modifiers & MOD_MASK_CTRL)) register_code(KC_LCTRL);
|
||||||
|
if ((force_modifiers & MOD_MASK_ALT) && !(active_modifiers & MOD_MASK_ALT)) register_code(KC_LALT);
|
||||||
|
if ((force_modifiers & MOD_MASK_GUI) && !(active_modifiers & MOD_MASK_GUI)) register_code(KC_LGUI);
|
||||||
|
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
|
||||||
|
if ((force_modifiers & MOD_MASK_SHIFT) && !(active_modifiers & MOD_MASK_SHIFT)) unregister_code(KC_LSFT);
|
||||||
|
if ((force_modifiers & MOD_MASK_CTRL) && !(active_modifiers & MOD_MASK_CTRL)) unregister_code(KC_LCTRL);
|
||||||
|
if ((force_modifiers & MOD_MASK_ALT) && !(active_modifiers & MOD_MASK_ALT)) unregister_code(KC_LALT);
|
||||||
|
if ((force_modifiers & MOD_MASK_GUI) && !(active_modifiers & MOD_MASK_GUI)) unregister_code(KC_LGUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special remapping for keys with different keycodes/macros when used with shift modifiers.
|
||||||
|
bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
uint8_t active_modifiers = get_mods();
|
||||||
|
uint8_t shifted = active_modifiers & MOD_MASK_SHIFT;
|
||||||
|
|
||||||
|
// Early return on key release
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shifted) {
|
||||||
|
clear_mods();
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case NEO2_1:
|
||||||
|
// degree symbol
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_8) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_2:
|
||||||
|
// section symbol
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_6) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_3:
|
||||||
|
// There is no OSX key combination for the script small l character
|
||||||
|
break;
|
||||||
|
case NEO2_4:
|
||||||
|
// right angled quote
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_BSLASH) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_5:
|
||||||
|
// left angled quote
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_BSLASH) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_6:
|
||||||
|
// dollar sign
|
||||||
|
SEND_STRING(SS_DOWN(X_LSHIFT) SS_TAP(X_4) SS_UP(X_LSHIFT));
|
||||||
|
break;
|
||||||
|
case NEO2_7:
|
||||||
|
// euro sign
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_2) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_8:
|
||||||
|
// low9 double quote
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_W) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_9:
|
||||||
|
// left double quote
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_LBRACKET) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_0:
|
||||||
|
// right double quote
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_LBRACKET) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_MINUS:
|
||||||
|
// em dash
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_MINUS) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_COMMA:
|
||||||
|
// en dash
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_MINUS) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_DOT:
|
||||||
|
// bullet
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_8) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_SHARP_S:
|
||||||
|
// german sharp s
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_UE:
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_U) SS_UP(X_LSHIFT));
|
||||||
|
break;
|
||||||
|
case NEO2_OE:
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_O) SS_UP(X_LSHIFT));
|
||||||
|
break;
|
||||||
|
case NEO2_AE:
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_A) SS_UP(X_LSHIFT));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
set_mods(active_modifiers);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_mods(active_modifiers);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
switch (keycode) {
|
||||||
|
case NEO2_1:
|
||||||
|
SEND_STRING(SS_TAP(X_1));
|
||||||
|
break;
|
||||||
|
case NEO2_2:
|
||||||
|
SEND_STRING(SS_TAP(X_2));
|
||||||
|
break;
|
||||||
|
case NEO2_3:
|
||||||
|
SEND_STRING(SS_TAP(X_3));
|
||||||
|
break;
|
||||||
|
case NEO2_4:
|
||||||
|
SEND_STRING(SS_TAP(X_4));
|
||||||
|
break;
|
||||||
|
case NEO2_5:
|
||||||
|
SEND_STRING(SS_TAP(X_5));
|
||||||
|
break;
|
||||||
|
case NEO2_6:
|
||||||
|
SEND_STRING(SS_TAP(X_6));
|
||||||
|
break;
|
||||||
|
case NEO2_7:
|
||||||
|
SEND_STRING(SS_TAP(X_7));
|
||||||
|
break;
|
||||||
|
case NEO2_8:
|
||||||
|
SEND_STRING(SS_TAP(X_8));
|
||||||
|
break;
|
||||||
|
case NEO2_9:
|
||||||
|
SEND_STRING(SS_TAP(X_9));
|
||||||
|
break;
|
||||||
|
case NEO2_0:
|
||||||
|
SEND_STRING(SS_TAP(X_0));
|
||||||
|
break;
|
||||||
|
case NEO2_MINUS:
|
||||||
|
SEND_STRING(SS_TAP(X_MINUS));
|
||||||
|
break;
|
||||||
|
case NEO2_COMMA:
|
||||||
|
SEND_STRING(SS_TAP(X_COMMA));
|
||||||
|
break;
|
||||||
|
case NEO2_DOT:
|
||||||
|
SEND_STRING(SS_TAP(X_DOT));
|
||||||
|
break;
|
||||||
|
case NEO2_SHARP_S:
|
||||||
|
// german sharp s
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT));
|
||||||
|
break;
|
||||||
|
case NEO2_UE:
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_U));
|
||||||
|
break;
|
||||||
|
case NEO2_OE:
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_O));
|
||||||
|
break;
|
||||||
|
case NEO2_AE:
|
||||||
|
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_A));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs for each key down or up event.
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_LSHIFT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
capslock_state |= (MOD_BIT(KC_LSHIFT));
|
||||||
|
} else {
|
||||||
|
capslock_state &= ~(MOD_BIT(KC_LSHIFT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case KC_RSHIFT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
capslock_state |= MOD_BIT(KC_RSHIFT);
|
||||||
|
} else {
|
||||||
|
capslock_state &= ~(MOD_BIT(KC_RSHIFT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NEO2_LMOD3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(NEO_3);
|
||||||
|
neo3_state |= (1 << 1);
|
||||||
|
} else {
|
||||||
|
// Turn off NEO_3 layer unless it's enabled through NEO2_RMOD3 as well.
|
||||||
|
if ((neo3_state & ~(1 << 1)) == 0) {
|
||||||
|
layer_off(NEO_3);
|
||||||
|
}
|
||||||
|
neo3_state &= ~(1 << 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NEO2_RMOD3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
neo3_timer = timer_read();
|
||||||
|
neo3_state |= (1 << 2);
|
||||||
|
layer_on(NEO_3);
|
||||||
|
} else {
|
||||||
|
// Turn off NEO_3 layer unless it's enabled through NEO2_LMOD3 as well.
|
||||||
|
if ((neo3_state & ~(1 << 2)) == 0) {
|
||||||
|
layer_off(NEO_3);
|
||||||
|
}
|
||||||
|
neo3_state &= ~(1 << 2);
|
||||||
|
|
||||||
|
// Was the NEO2_RMOD3 key TAPPED?
|
||||||
|
if (timer_elapsed(neo3_timer) <= 150) {
|
||||||
|
if (neo3_state > 0) {
|
||||||
|
// We are still in NEO_3 layer, send keycode and modifiers for @
|
||||||
|
tap_with_modifiers(KC_2, MOD_MASK_SHIFT);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
// Do the normal key processing, send y
|
||||||
|
tap_with_modifiers(KC_Y, MOD_MASK_NONE);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((capslock_state & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) {
|
||||||
|
// CAPSLOCK is currently active, disable it
|
||||||
|
if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
unregister_code(KC_LOCKING_CAPS);
|
||||||
|
} else {
|
||||||
|
register_code(KC_LOCKING_CAPS);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return process_record_user_shifted(keycode, record);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void){
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
enum layers {
|
||||||
|
NEO_1, // layer_0
|
||||||
|
NEO_3, // layer_1
|
||||||
|
NEO_4, // layer_2
|
||||||
|
NEO_5, // layer_3
|
||||||
|
NEO_6, // layer_4
|
||||||
|
US_1, // layer_5
|
||||||
|
FKEYS // layer_6
|
||||||
|
};
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
# Neo 2 for ErgoDox on QWERTY
|
||||||
|
|
||||||
|
# Description
|
||||||
|
|
||||||
|
The Neo layout is an optimized German keyboard layout developed by the
|
||||||
|
Neo Users Group, supporting many Latin-based alphabets. The positions
|
||||||
|
of the letters are not only optimized for German letter frequency,
|
||||||
|
but also for typical groups of two or three letters. English is
|
||||||
|
considered a primary target as well.
|
||||||
|
|
||||||
|
The design tries to enforce the alternating usage of both hands to
|
||||||
|
increase typing speed and incorporates ideas from de-ergo and other
|
||||||
|
ergonomic layouts. High frequency keys are placed in the home row.
|
||||||
|
The current layout Neo 2.0 has unique features making it suited for
|
||||||
|
many target groups such as programmers, mathematicians, scientists or
|
||||||
|
LaTeX authors.
|
||||||
|
|
||||||
|
Neo is grouped into six layers, each dedicated to a special purpose.
|
||||||
|
|
||||||
|
# Layers
|
||||||
|
|
||||||
|
At the core this is a Neo 2.0 layout adjusted for the Ergodox Infinity.
|
||||||
|
The keymap is laid out expecting a macOs using the US QWERTY or ABC
|
||||||
|
Extended layout.
|
||||||
|
|
||||||
|
[Layer 1](#layer-1) Lowercase, upppercase and typographical characters
|
||||||
|
|
||||||
|
[Layer 2](#layer-2) Special characters for programming
|
||||||
|
|
||||||
|
[Layer 3](#layer-3) WASD-like movement keys and number block
|
||||||
|
|
||||||
|
[Layer 4](#layer-4) Greek characters
|
||||||
|
|
||||||
|
[Layer 5](#layer-5) Mathematical symbols and Greek uppercase characters
|
||||||
|
|
||||||
|
[Layer 6](#layer-6) Ergodox Infinity US QWERTY layout
|
||||||
|
|
||||||
|
[Layer 7](#layer-7) Function keys
|
||||||
|
|
||||||
|
## Legend
|
||||||
|
|
||||||
|
* Keys marked with `----` are dead keys.
|
||||||
|
* Blank keys are transparent and fall through to lower levels.
|
||||||
|
|
||||||
|
## Layer 1
|
||||||
|
|
||||||
|
This layer implements NEO layers 1 and 2.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ---- | 1/° | 2/§ | 3/ | 4/» | 5/« | ESC | | US_1 | 6/$ | 7/€ | 8/„ | 9/“ | 0/” | -/— |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| TAB | X | V | L | C | W | LCTL | | RCTL | K | H | G | F | Q | ß |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| NEO_3 | U | I | A | E | O |------| |------| S | N | R | T | D | Y |
|
||||||
|
|--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------|
|
||||||
|
| LSHIFT | Ü | Ö | Ä | P | Z | | | | B | M | ,/– | ./• | J | RSHIFT |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| ---- | ---- | LCTL | LALT | LGUI | | RGUI | Left | Down | Up | Right|
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| FKEYS| Home | | PgUp | FKEYS|
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| Back-| | End | | PgDn | | |
|
||||||
|
| space|Delete|------| |------| Enter|Space |
|
||||||
|
| | | NEO_4| | NEO_4| | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 2
|
||||||
|
|
||||||
|
This layer implements NEO layer 3.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ---- | ---- | ---- | ---- | › | ‹ | | | | ¢ | ¥ | ‚ | ‘ | ’ | ---- |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| ---- | … | _ | [ | ] | ^ | | | | ! | < | > | = | & | ---- |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | \ | / | { | } | * |------| |------| ? | ( | ) | - | : | @ |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | # | $ | | | ~ | ` | | | | + | % | " | ' | ; | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 3
|
||||||
|
|
||||||
|
This layer implements NEO layer 4.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ---- | ª | º | ---- | · | £ | | | | ---- | Tab | / | * | - | ---- |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| ---- | PgUp | ⌫ | Up | ⌦ | PgDn | | | | ¡ | 7 | 8 | 9 | + | – |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | Home | Left | Down | Right| End |------| |------| ¿ | 4 | 5 | 6 | , | . |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | Esc | Tab | Ins |Return| ---- | | | | : | 1 | 2 | 3 | ; | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | 0 | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 4
|
||||||
|
|
||||||
|
This layer is currently empty/reserved for NEO layer 5.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 5
|
||||||
|
|
||||||
|
This layer is currently empty/reserved for NEO layer 6.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 6
|
||||||
|
|
||||||
|
A bare bones implementation of the default Ergodox Infinity layout.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 | ESC | | NEO_1| 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| \ | Q | W | E | R | T | ---- | | [ | Y | U | I | O | P | ] |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||||
|
|--------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+--------|
|
||||||
|
| LSHIFT | Z | X | V | B | M | | | | N | M | , | . | / | RSHIFT |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| LGUI | ` | ---- | ---- | FKEYS| | Left | Down | Up | Right| RGUI |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| LCTRL| LALT | | RALT | RCTRL|
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | HOME | | PGUP | | |
|
||||||
|
| BKSP | DEL |------| |------| ENTR | SPCE |
|
||||||
|
| | | END | | PGDN | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 7
|
||||||
|
|
||||||
|
This layer implements function and multimedia keys.
|
||||||
|
|
||||||
|
```
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| Prev | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | VolUp |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| Play | | | | | | | | | | | | | | VolDn |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| Next | | | | | |------| |------| | | | | | Mute |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | | | | | | | | | | | | | | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#include "layers.h"
|
||||||
|
#include "simple_visualizer.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
static void get_visualizer_layer_and_color(visualizer_state_t *state) {
|
||||||
|
uint8_t layer = biton32(state->status.layer);
|
||||||
|
|
||||||
|
// Go from highest to lowest layer to get the right text/color combination.
|
||||||
|
switch (layer) {
|
||||||
|
// #AEB2F4 / hsv(65.71%, 28.69%, 95.69%)
|
||||||
|
case FKEYS:
|
||||||
|
// #F4AEDC / hsv(89.05%, 28.69%, 95.69%)
|
||||||
|
state->layer_text = "FUNCTION KEYS";
|
||||||
|
state->target_lcd_color = LCD_COLOR(228, 73, 245);
|
||||||
|
break;
|
||||||
|
case US_1:
|
||||||
|
// #F4B993 / hsv(6.53%, 39.75%, 95.69%)
|
||||||
|
state->layer_text = "QWERTY";
|
||||||
|
state->target_lcd_color = LCD_COLOR(17, 102, 245);
|
||||||
|
break;
|
||||||
|
case NEO_6:
|
||||||
|
// #F4E393 / hsv(13.75%, 39.75%, 95.69%)
|
||||||
|
state->layer_text = "NEO: 6";
|
||||||
|
state->target_lcd_color = LCD_COLOR(35, 102, 245);
|
||||||
|
break;
|
||||||
|
case NEO_5:
|
||||||
|
// #C6F493 / hsv(24.57%, 39.75%, 95.69%)
|
||||||
|
state->layer_text = "NEO: 5";
|
||||||
|
state->target_lcd_color = LCD_COLOR(63, 102, 245);
|
||||||
|
break;
|
||||||
|
case NEO_4:
|
||||||
|
// #8EEBC9 / hsv(43.91%, 39.57%, 92.16%)
|
||||||
|
state->layer_text = "NEO: 4";
|
||||||
|
state->target_lcd_color = LCD_COLOR(112, 101, 189);
|
||||||
|
break;
|
||||||
|
case NEO_3:
|
||||||
|
// #93D2F4 / hsv(55.84%, 39.75%, 95.69%)
|
||||||
|
state->layer_text = "NEO: 3";
|
||||||
|
state->target_lcd_color = LCD_COLOR(143, 102, 245);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// #EEEEEE / hsv(0%, 0%, 93%)
|
||||||
|
state->layer_text = "NEO: 1";
|
||||||
|
state->target_lcd_color = LCD_COLOR(0, 0, 255);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -53,16 +53,16 @@ static void init(void) {
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef LED_DRIVER_ADDR_1
|
#ifdef LED_DRIVER_ADDR_1
|
||||||
IS31FL3733_init(LED_DRIVER_ADDR_1);
|
IS31FL3733_init(LED_DRIVER_ADDR_1, 0 );
|
||||||
#endif
|
#endif
|
||||||
#ifdef LED_DRIVER_ADDR_2
|
#ifdef LED_DRIVER_ADDR_2
|
||||||
IS31FL3733_init(LED_DRIVER_ADDR_2);
|
IS31FL3733_init(LED_DRIVER_ADDR_2, 0 );
|
||||||
#endif
|
#endif
|
||||||
#ifdef LED_DRIVER_ADDR_3
|
#ifdef LED_DRIVER_ADDR_3
|
||||||
IS31FL3733_init(LED_DRIVER_ADDR_3);
|
IS31FL3733_init(LED_DRIVER_ADDR_3, 0 );
|
||||||
#endif
|
#endif
|
||||||
#ifdef LED_DRIVER_ADDR_4
|
#ifdef LED_DRIVER_ADDR_4
|
||||||
IS31FL3733_init(LED_DRIVER_ADDR_4);
|
IS31FL3733_init(LED_DRIVER_ADDR_4, 0 );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static void init( void )
|
|||||||
IS31FL3731_init( DRIVER_ADDR_1 );
|
IS31FL3731_init( DRIVER_ADDR_1 );
|
||||||
IS31FL3731_init( DRIVER_ADDR_2 );
|
IS31FL3731_init( DRIVER_ADDR_2 );
|
||||||
#elif defined(IS31FL3733)
|
#elif defined(IS31FL3733)
|
||||||
IS31FL3733_init( DRIVER_ADDR_1 );
|
IS31FL3733_init( DRIVER_ADDR_1, 0 );
|
||||||
#else
|
#else
|
||||||
IS31FL3737_init( DRIVER_ADDR_1 );
|
IS31FL3737_init( DRIVER_ADDR_1 );
|
||||||
#endif
|
#endif
|
||||||
@@ -53,7 +53,8 @@ static void init( void )
|
|||||||
#ifdef IS31FL3731
|
#ifdef IS31FL3731
|
||||||
IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
|
IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
|
||||||
#elif defined(IS31FL3733)
|
#elif defined(IS31FL3733)
|
||||||
IS31FL3733_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
|
IS31FL3733_update_led_control_registers( DRIVER_ADDR_1, 0 );
|
||||||
|
IS31FL3733_update_led_control_registers( DRIVER_ADDR_2, 1 );
|
||||||
#else
|
#else
|
||||||
IS31FL3737_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
|
IS31FL3737_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
|
||||||
#endif
|
#endif
|
||||||
@@ -74,7 +75,8 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
|
|||||||
#elif defined(IS31FL3733)
|
#elif defined(IS31FL3733)
|
||||||
static void flush( void )
|
static void flush( void )
|
||||||
{
|
{
|
||||||
IS31FL3733_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 );
|
IS31FL3733_update_pwm_buffers( DRIVER_ADDR_1, 0);
|
||||||
|
IS31FL3733_update_pwm_buffers( DRIVER_ADDR_2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const rgb_matrix_driver_t rgb_matrix_driver = {
|
const rgb_matrix_driver_t rgb_matrix_driver = {
|
||||||
|
|||||||
+67
-50
@@ -101,19 +101,35 @@ LED_TYPE led[RGBLED_NUM];
|
|||||||
|
|
||||||
static uint8_t clipping_start_pos = 0;
|
static uint8_t clipping_start_pos = 0;
|
||||||
static uint8_t clipping_num_leds = RGBLED_NUM;
|
static uint8_t clipping_num_leds = RGBLED_NUM;
|
||||||
|
static uint8_t effect_start_pos = 0;
|
||||||
|
static uint8_t effect_end_pos = RGBLED_NUM;
|
||||||
|
static uint8_t effect_num_leds = RGBLED_NUM;
|
||||||
|
|
||||||
void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
|
void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
|
||||||
clipping_start_pos = start_pos;
|
clipping_start_pos = start_pos;
|
||||||
clipping_num_leds = num_leds;
|
clipping_num_leds = num_leds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) {
|
||||||
|
if (start_pos >= RGBLED_NUM) return;
|
||||||
|
if (start_pos + num_leds > RGBLED_NUM) return;
|
||||||
|
effect_start_pos = start_pos;
|
||||||
|
effect_end_pos = start_pos + num_leds;
|
||||||
|
effect_num_leds = num_leds;
|
||||||
|
}
|
||||||
|
|
||||||
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
|
void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
|
||||||
HSV hsv = { hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val };
|
HSV hsv = { hue, sat, val };
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
setrgb(rgb.r, rgb.g, rgb.b, led1);
|
setrgb(rgb.r, rgb.g, rgb.b, led1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
|
||||||
|
sethsv_raw( hue, sat,
|
||||||
|
val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val,
|
||||||
|
led1);
|
||||||
|
}
|
||||||
|
|
||||||
void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
|
void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
|
||||||
(*led1).r = r;
|
(*led1).r = r;
|
||||||
(*led1).g = g;
|
(*led1).g = g;
|
||||||
@@ -501,15 +517,15 @@ void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool w
|
|||||||
#else
|
#else
|
||||||
uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2];
|
uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2];
|
||||||
#endif
|
#endif
|
||||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
for (uint8_t i = 0; i < effect_num_leds; i++) {
|
||||||
uint8_t _hue = ((uint16_t)i * (uint16_t)range) / RGBLED_NUM;
|
uint8_t _hue = ((uint16_t)i * (uint16_t)range) / effect_num_leds;
|
||||||
if (direction) {
|
if (direction) {
|
||||||
_hue = hue + _hue;
|
_hue = hue + _hue;
|
||||||
} else {
|
} else {
|
||||||
_hue = hue - _hue;
|
_hue = hue - _hue;
|
||||||
}
|
}
|
||||||
dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range);
|
dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range);
|
||||||
sethsv(_hue, sat, val, (LED_TYPE *)&led[i]);
|
sethsv(_hue, sat, val, (LED_TYPE *)&led[i + effect_start_pos]);
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
}
|
}
|
||||||
@@ -557,7 +573,7 @@ uint8_t rgblight_get_val(void) {
|
|||||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
|
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
if (!rgblight_config.enable) { return; }
|
if (!rgblight_config.enable) { return; }
|
||||||
|
|
||||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) {
|
||||||
led[i].r = r;
|
led[i].r = r;
|
||||||
led[i].g = g;
|
led[i].g = g;
|
||||||
led[i].b = b;
|
led[i].b = b;
|
||||||
@@ -615,6 +631,7 @@ void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start,
|
|||||||
rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
|
rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef RGBLIGHT_SPLIT
|
||||||
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) {
|
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2);
|
rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2);
|
||||||
}
|
}
|
||||||
@@ -630,36 +647,34 @@ void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) {
|
|||||||
void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) {
|
void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) {
|
||||||
rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM);
|
rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM);
|
||||||
}
|
}
|
||||||
|
#endif // ifndef RGBLIGHT_SPLIT
|
||||||
|
|
||||||
#ifndef RGBLIGHT_CUSTOM_DRIVER
|
#ifndef RGBLIGHT_CUSTOM_DRIVER
|
||||||
void rgblight_set(void) {
|
void rgblight_set(void) {
|
||||||
LED_TYPE *start_led = led + clipping_start_pos;
|
LED_TYPE *start_led;
|
||||||
uint16_t num_leds = clipping_num_leds;
|
uint16_t num_leds = clipping_num_leds;
|
||||||
if (rgblight_config.enable) {
|
|
||||||
#ifdef RGBLIGHT_LED_MAP
|
if (!rgblight_config.enable) {
|
||||||
LED_TYPE led0[RGBLED_NUM];
|
for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) {
|
||||||
for(uint8_t i = 0; i < RGBLED_NUM; i++) {
|
|
||||||
led0[i] = led[pgm_read_byte(&led_map[i])];
|
|
||||||
}
|
|
||||||
start_led = led0 + clipping_start_pos;
|
|
||||||
#endif
|
|
||||||
#ifdef RGBW
|
|
||||||
ws2812_setleds_rgbw(start_led, num_leds);
|
|
||||||
#else
|
|
||||||
ws2812_setleds(start_led, num_leds);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
|
||||||
led[i].r = 0;
|
led[i].r = 0;
|
||||||
led[i].g = 0;
|
led[i].g = 0;
|
||||||
led[i].b = 0;
|
led[i].b = 0;
|
||||||
}
|
}
|
||||||
#ifdef RGBW
|
|
||||||
ws2812_setleds_rgbw(start_led, num_leds);
|
|
||||||
#else
|
|
||||||
ws2812_setleds(start_led, num_leds);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#ifdef RGBLIGHT_LED_MAP
|
||||||
|
LED_TYPE led0[RGBLED_NUM];
|
||||||
|
for(uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||||
|
led0[i] = led[pgm_read_byte(&led_map[i])];
|
||||||
|
}
|
||||||
|
start_led = led0 + clipping_start_pos;
|
||||||
|
#else
|
||||||
|
start_led = led + clipping_start_pos;
|
||||||
|
#endif
|
||||||
|
#ifdef RGBW
|
||||||
|
ws2812_setleds_rgbw(start_led, num_leds);
|
||||||
|
#else
|
||||||
|
ws2812_setleds(start_led, num_leds);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -926,9 +941,9 @@ void rgblight_effect_rainbow_swirl(animation_status_t *anim) {
|
|||||||
uint8_t hue;
|
uint8_t hue;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
for (i = 0; i < RGBLED_NUM; i++) {
|
for (i = 0; i < effect_num_leds; i++) {
|
||||||
hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / RGBLED_NUM * i + anim->current_hue);
|
hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / effect_num_leds * i + anim->current_hue);
|
||||||
sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]);
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
|
|
||||||
@@ -957,7 +972,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
|
|||||||
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
|
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
|
||||||
if (anim->pos == 0) { // restart signal
|
if (anim->pos == 0) { // restart signal
|
||||||
if (increment == 1) {
|
if (increment == 1) {
|
||||||
pos = RGBLED_NUM - 1;
|
pos = effect_num_leds - 1;
|
||||||
} else {
|
} else {
|
||||||
pos = 0;
|
pos = 0;
|
||||||
}
|
}
|
||||||
@@ -965,26 +980,27 @@ void rgblight_effect_snake(animation_status_t *anim) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < RGBLED_NUM; i++) {
|
for (i = 0; i < effect_num_leds; i++) {
|
||||||
led[i].r = 0;
|
LED_TYPE *ledp = led + i + effect_start_pos;
|
||||||
led[i].g = 0;
|
ledp->r = 0;
|
||||||
led[i].b = 0;
|
ledp->g = 0;
|
||||||
|
ledp->b = 0;
|
||||||
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
|
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
|
||||||
k = pos + j * increment;
|
k = pos + j * increment;
|
||||||
if (k < 0) {
|
if (k < 0) {
|
||||||
k = k + RGBLED_NUM;
|
k = k + effect_num_leds;
|
||||||
}
|
}
|
||||||
if (i == k) {
|
if (i == k) {
|
||||||
sethsv(rgblight_config.hue, rgblight_config.sat,
|
sethsv(rgblight_config.hue, rgblight_config.sat,
|
||||||
(uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH),
|
(uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH),
|
||||||
(LED_TYPE *)&led[i]);
|
ledp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
if (increment == 1) {
|
if (increment == 1) {
|
||||||
if (pos - 1 < 0) {
|
if (pos - 1 < 0) {
|
||||||
pos = RGBLED_NUM - 1;
|
pos = effect_num_leds - 1;
|
||||||
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
|
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
|
||||||
anim->pos = 0;
|
anim->pos = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -995,7 +1011,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pos = (pos + 1) % RGBLED_NUM;
|
pos = (pos + 1) % effect_num_leds;
|
||||||
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
|
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
|
||||||
anim->pos = pos;
|
anim->pos = pos;
|
||||||
#endif
|
#endif
|
||||||
@@ -1023,14 +1039,14 @@ void rgblight_effect_knight(animation_status_t *anim) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Set all the LEDs to 0
|
// Set all the LEDs to 0
|
||||||
for (i = 0; i < RGBLED_NUM; i++) {
|
for (i = effect_start_pos; i < effect_end_pos; i++) {
|
||||||
led[i].r = 0;
|
led[i].r = 0;
|
||||||
led[i].g = 0;
|
led[i].g = 0;
|
||||||
led[i].b = 0;
|
led[i].b = 0;
|
||||||
}
|
}
|
||||||
// Determine which LEDs should be lit up
|
// Determine which LEDs should be lit up
|
||||||
for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) {
|
for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) {
|
||||||
cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % RGBLED_NUM;
|
cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % effect_num_leds + effect_start_pos;
|
||||||
|
|
||||||
if (i >= low_bound && i <= high_bound) {
|
if (i >= low_bound && i <= high_bound) {
|
||||||
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]);
|
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]);
|
||||||
@@ -1064,9 +1080,9 @@ void rgblight_effect_christmas(animation_status_t *anim) {
|
|||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
anim->current_offset = (anim->current_offset + 1) % 2;
|
anim->current_offset = (anim->current_offset + 1) % 2;
|
||||||
for (i = 0; i < RGBLED_NUM; i++) {
|
for (i = 0; i < effect_num_leds; i++) {
|
||||||
hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + anim->current_offset) % 2) * 85;
|
hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + anim->current_offset) % 2) * 85;
|
||||||
sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]);
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
}
|
}
|
||||||
@@ -1099,13 +1115,14 @@ void rgblight_effect_rgbtest(animation_status_t *anim) {
|
|||||||
#ifdef RGBLIGHT_EFFECT_ALTERNATING
|
#ifdef RGBLIGHT_EFFECT_ALTERNATING
|
||||||
void rgblight_effect_alternating(animation_status_t *anim) {
|
void rgblight_effect_alternating(animation_status_t *anim) {
|
||||||
|
|
||||||
for(int i = 0; i<RGBLED_NUM; i++){
|
for (int i = 0; i < effect_num_leds; i++) {
|
||||||
if(i<RGBLED_NUM/2 && anim->pos){
|
LED_TYPE *ledp = led + i + effect_start_pos;
|
||||||
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
if (i<effect_num_leds/2 && anim->pos) {
|
||||||
}else if (i>=RGBLED_NUM/2 && !anim->pos){
|
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
|
||||||
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
} else if (i>=effect_num_leds/2 && !anim->pos) {
|
||||||
}else{
|
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
|
||||||
sethsv(rgblight_config.hue, rgblight_config.sat, 0, (LED_TYPE *)&led[i]);
|
} else {
|
||||||
|
sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
|
|||||||
+98
-79
@@ -99,7 +99,7 @@ enum RGBLIGHT_EFFECT_MODE {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
|
#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM
|
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (effect_num_leds)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
|
#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
|
||||||
@@ -170,6 +170,100 @@ typedef struct _rgblight_status_t {
|
|||||||
#endif
|
#endif
|
||||||
} rgblight_status_t;
|
} rgblight_status_t;
|
||||||
|
|
||||||
|
/* === Utility Functions ===*/
|
||||||
|
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
|
||||||
|
void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check
|
||||||
|
void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
|
||||||
|
|
||||||
|
/* === Low level Functions === */
|
||||||
|
void rgblight_set(void);
|
||||||
|
void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds);
|
||||||
|
|
||||||
|
/* === Effects and Animations Functions === */
|
||||||
|
/* effect range setting */
|
||||||
|
void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds);
|
||||||
|
|
||||||
|
/* direct operation */
|
||||||
|
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
|
||||||
|
void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index);
|
||||||
|
void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end);
|
||||||
|
void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end);
|
||||||
|
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
|
||||||
|
#ifndef RGBLIGHT_SPLIT
|
||||||
|
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val);
|
||||||
|
void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* effect mode change */
|
||||||
|
void rgblight_mode(uint8_t mode);
|
||||||
|
void rgblight_mode_noeeprom(uint8_t mode);
|
||||||
|
void rgblight_increase(void);
|
||||||
|
void rgblight_decrease(void);
|
||||||
|
void rgblight_step(void);
|
||||||
|
void rgblight_step_noeeprom(void);
|
||||||
|
void rgblight_step_reverse(void);
|
||||||
|
void rgblight_step_reverse_noeeprom(void);
|
||||||
|
|
||||||
|
/* effects mode disable/enable */
|
||||||
|
void rgblight_toggle(void);
|
||||||
|
void rgblight_toggle_noeeprom(void);
|
||||||
|
void rgblight_enable(void);
|
||||||
|
void rgblight_enable_noeeprom(void);
|
||||||
|
void rgblight_disable(void);
|
||||||
|
void rgblight_disable_noeeprom(void);
|
||||||
|
|
||||||
|
/* hue, sat, val change */
|
||||||
|
void rgblight_increase_hue(void);
|
||||||
|
void rgblight_increase_hue_noeeprom(void);
|
||||||
|
void rgblight_decrease_hue(void);
|
||||||
|
void rgblight_decrease_hue_noeeprom(void);
|
||||||
|
void rgblight_increase_sat(void);
|
||||||
|
void rgblight_increase_sat_noeeprom(void);
|
||||||
|
void rgblight_decrease_sat(void);
|
||||||
|
void rgblight_decrease_sat_noeeprom(void);
|
||||||
|
void rgblight_increase_val(void);
|
||||||
|
void rgblight_increase_val_noeeprom(void);
|
||||||
|
void rgblight_decrease_val(void);
|
||||||
|
void rgblight_decrease_val_noeeprom(void);
|
||||||
|
void rgblight_increase_speed(void);
|
||||||
|
void rgblight_decrease_speed(void);
|
||||||
|
void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val);
|
||||||
|
void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val);
|
||||||
|
|
||||||
|
/* query */
|
||||||
|
uint8_t rgblight_get_mode(void);
|
||||||
|
uint8_t rgblight_get_hue(void);
|
||||||
|
uint8_t rgblight_get_sat(void);
|
||||||
|
uint8_t rgblight_get_val(void);
|
||||||
|
|
||||||
|
/* === qmk_firmware (core)internal Functions === */
|
||||||
|
void rgblight_init(void);
|
||||||
|
uint32_t rgblight_read_dword(void);
|
||||||
|
void rgblight_update_dword(uint32_t dword);
|
||||||
|
uint32_t eeconfig_read_rgblight(void);
|
||||||
|
void eeconfig_update_rgblight(uint32_t val);
|
||||||
|
void eeconfig_update_rgblight_default(void);
|
||||||
|
void eeconfig_debug_rgblight(void);
|
||||||
|
|
||||||
|
void rgb_matrix_increase(void);
|
||||||
|
void rgb_matrix_decrease(void);
|
||||||
|
|
||||||
|
void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
|
||||||
|
void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
|
||||||
|
|
||||||
|
#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
|
||||||
|
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
|
||||||
|
void rgblight_task(void);
|
||||||
|
|
||||||
|
void rgblight_timer_init(void);
|
||||||
|
void rgblight_timer_enable(void);
|
||||||
|
void rgblight_timer_disable(void);
|
||||||
|
void rgblight_timer_toggle(void);
|
||||||
|
|
||||||
#ifdef RGBLIGHT_SPLIT
|
#ifdef RGBLIGHT_SPLIT
|
||||||
#define RGBLIGHT_STATUS_CHANGE_MODE (1<<0)
|
#define RGBLIGHT_STATUS_CHANGE_MODE (1<<0)
|
||||||
#define RGBLIGHT_STATUS_CHANGE_HSVS (1<<1)
|
#define RGBLIGHT_STATUS_CHANGE_HSVS (1<<1)
|
||||||
@@ -183,87 +277,12 @@ typedef struct _rgblight_status_t {
|
|||||||
|
|
||||||
/* for split keyboard master side */
|
/* for split keyboard master side */
|
||||||
uint8_t rgblight_get_change_flags(void);
|
uint8_t rgblight_get_change_flags(void);
|
||||||
void rgblight_clear_change_flags(void);
|
void rgblight_clear_change_flags(void);
|
||||||
void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo);
|
void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo);
|
||||||
/* for split keyboard slave side */
|
/* for split keyboard slave side */
|
||||||
void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom);
|
void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void rgblight_init(void);
|
|
||||||
void rgblight_increase(void);
|
|
||||||
void rgblight_decrease(void);
|
|
||||||
void rgblight_toggle(void);
|
|
||||||
void rgblight_enable(void);
|
|
||||||
void rgblight_disable(void);
|
|
||||||
void rgblight_step(void);
|
|
||||||
void rgblight_step_reverse(void);
|
|
||||||
uint8_t rgblight_get_mode(void);
|
|
||||||
void rgblight_mode(uint8_t mode);
|
|
||||||
void rgblight_set(void);
|
|
||||||
uint32_t rgblight_read_dword(void);
|
|
||||||
void rgblight_update_dword(uint32_t dword);
|
|
||||||
void rgblight_increase_hue(void);
|
|
||||||
void rgblight_decrease_hue(void);
|
|
||||||
void rgblight_increase_sat(void);
|
|
||||||
void rgblight_decrease_sat(void);
|
|
||||||
void rgblight_increase_val(void);
|
|
||||||
void rgblight_decrease_val(void);
|
|
||||||
void rgblight_increase_speed(void);
|
|
||||||
void rgblight_decrease_speed(void);
|
|
||||||
void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val);
|
|
||||||
uint8_t rgblight_get_hue(void);
|
|
||||||
uint8_t rgblight_get_sat(void);
|
|
||||||
uint8_t rgblight_get_val(void);
|
|
||||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
|
|
||||||
void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index);
|
|
||||||
void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end);
|
|
||||||
void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end);
|
|
||||||
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val);
|
|
||||||
void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val);
|
|
||||||
void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds);
|
|
||||||
|
|
||||||
uint32_t eeconfig_read_rgblight(void);
|
|
||||||
void eeconfig_update_rgblight(uint32_t val);
|
|
||||||
void eeconfig_update_rgblight_default(void);
|
|
||||||
void eeconfig_debug_rgblight(void);
|
|
||||||
|
|
||||||
void rgb_matrix_increase(void);
|
|
||||||
void rgb_matrix_decrease(void);
|
|
||||||
|
|
||||||
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
|
|
||||||
void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
|
|
||||||
|
|
||||||
void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val);
|
|
||||||
void rgblight_mode_noeeprom(uint8_t mode);
|
|
||||||
void rgblight_toggle_noeeprom(void);
|
|
||||||
void rgblight_enable_noeeprom(void);
|
|
||||||
void rgblight_disable_noeeprom(void);
|
|
||||||
void rgblight_step_noeeprom(void);
|
|
||||||
void rgblight_step_reverse_noeeprom(void);
|
|
||||||
void rgblight_increase_hue_noeeprom(void);
|
|
||||||
void rgblight_decrease_hue_noeeprom(void);
|
|
||||||
void rgblight_increase_sat_noeeprom(void);
|
|
||||||
void rgblight_decrease_sat_noeeprom(void);
|
|
||||||
void rgblight_increase_val_noeeprom(void);
|
|
||||||
void rgblight_decrease_val_noeeprom(void);
|
|
||||||
|
|
||||||
void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
|
|
||||||
void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
|
|
||||||
|
|
||||||
|
|
||||||
#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
|
|
||||||
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
|
|
||||||
void rgblight_task(void);
|
|
||||||
|
|
||||||
void rgblight_timer_init(void);
|
|
||||||
void rgblight_timer_enable(void);
|
|
||||||
void rgblight_timer_disable(void);
|
|
||||||
void rgblight_timer_toggle(void);
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_USE_TIMER
|
#ifdef RGBLIGHT_USE_TIMER
|
||||||
|
|
||||||
typedef struct _animation_status_t {
|
typedef struct _animation_status_t {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ The project also includes community support for [lots of other keyboards](/keybo
|
|||||||
|
|
||||||
## Maintainers
|
## Maintainers
|
||||||
|
|
||||||
QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy).
|
QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [ZSA Technology Labs](https://github.com/zsa), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy).
|
||||||
|
|
||||||
## Official Website
|
## Official Website
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user