Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37fb14f1b5 | ||
|
|
3925ff5342 | ||
|
|
0831a3181a | ||
|
|
ac8cddda22 | ||
|
|
e6217b6aa6 | ||
|
|
795e82074d | ||
|
|
70f40339c2 |
No files matched your search
@@ -29,6 +29,7 @@ jobs:
|
|||||||
- name: Commit files
|
- name: Commit files
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: "Format code according to conventions for ${GITHUB_SHA}"
|
commit_message: Format code according to conventions for $GITHUB_SHA
|
||||||
commit_user_name: QMK Bot
|
commit_user_name: QMK Bot
|
||||||
commit_user_email: [email protected]
|
commit_user_email: [email protected]
|
||||||
|
commit_author: QMK Bot <[email protected]>
|
||||||
@@ -296,6 +296,16 @@ This command allows you to generate QMK documentation locally. It can be uses fo
|
|||||||
qmk generate-docs
|
qmk generate-docs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk generate-rgb-breathe-table`
|
||||||
|
|
||||||
|
This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/`.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk generate-rgb-breathe-table [-q] [-o OUTPUT] [-m MAX] [-c CENTER]
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk kle2json`
|
## `qmk kle2json`
|
||||||
|
|
||||||
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ Module | Equivalent `#define` | Source
|
|||||||
-----------------|---------------------------------|------------------------------------------
|
-----------------|---------------------------------|------------------------------------------
|
||||||
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
|
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
|
||||||
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
|
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
|
||||||
|
24LC64 EEPROM | `#define EEPROM_I2C_24LC64` | <https://www.microchip.com/wwwproducts/en/24LC64>
|
||||||
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
|
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
|
||||||
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
|
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
|
||||||
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
|
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
|
||||||
|
|||||||
@@ -49,6 +49,11 @@
|
|||||||
# define EXTERNAL_EEPROM_PAGE_SIZE 64
|
# define EXTERNAL_EEPROM_PAGE_SIZE 64
|
||||||
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
|
#elif defined(EEPROM_I2C_24LC64)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 8192
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 32
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
#elif defined(EEPROM_I2C_MB85RC256V)
|
#elif defined(EEPROM_I2C_MB85RC256V)
|
||||||
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
|
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
|
||||||
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
|
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
#define LED_NUM_LOCK_PIN B2
|
#define LED_CAPS_LOCK_PIN B2
|
||||||
#define LED_PIN_ON_STATE 0
|
#define LED_PIN_ON_STATE 0
|
||||||
|
|
||||||
#define BACKLIGHT_PIN B6
|
#define BACKLIGHT_PIN B6
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define SSD1306OLED
|
#define SSD1306OLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define OLED_UPDATE_INTERVAL 50
|
||||||
|
|
||||||
/* Select rows configuration */
|
/* Select rows configuration */
|
||||||
// Rows are 4 or 5
|
// Rows are 4 or 5
|
||||||
// #define HELIX_ROWS 5 see ./rules.mk
|
// #define HELIX_ROWS 5 see ./rules.mk
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2020 yushakobo
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "bootloader.h"
|
#include "bootloader.h"
|
||||||
#ifdef PROTOCOL_LUFA
|
#ifdef PROTOCOL_LUFA
|
||||||
@@ -7,17 +23,6 @@
|
|||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SSD1306OLED
|
|
||||||
#include "ssd1306.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
//Following line allows macro to read current RGB settings
|
|
||||||
extern rgblight_config_t rgblight_config;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern uint8_t is_master;
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// 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.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
@@ -420,16 +425,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
rgblight_mode(RGB_current_mode);
|
rgblight_mode(RGB_current_mode);
|
||||||
rgblight_step();
|
rgblight_step();
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_get_mode();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case EISU:
|
case EISU:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if(keymap_config.swap_lalt_lgui==false){
|
if (is_mac_mode()) {
|
||||||
register_code(KC_LANG2);
|
register_code(KC_LANG2);
|
||||||
}else{
|
} else {
|
||||||
SEND_STRING(SS_LALT("`"));
|
SEND_STRING(SS_LALT("`"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -439,9 +444,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
break;
|
break;
|
||||||
case KANA:
|
case KANA:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if(keymap_config.swap_lalt_lgui==false){
|
if (is_mac_mode()) {
|
||||||
register_code(KC_LANG1);
|
register_code(KC_LANG1);
|
||||||
}else{
|
} else {
|
||||||
SEND_STRING(SS_LALT("`"));
|
SEND_STRING(SS_LALT("`"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -454,7 +459,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
eeconfig_update_rgblight_default();
|
eeconfig_update_rgblight_default();
|
||||||
rgblight_enable();
|
rgblight_enable();
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_get_mode();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@@ -462,12 +467,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
#include "ssd1306.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
startup_user();
|
startup_user();
|
||||||
#endif
|
#endif
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_get_mode();
|
||||||
#endif
|
#endif
|
||||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
@@ -500,132 +509,3 @@ void music_scale_user(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
|
||||||
#ifdef SSD1306OLED
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
iota_gfx_task(); // this is what updates the display continuously
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_update(struct CharacterMatrix *dest,
|
|
||||||
const struct CharacterMatrix *source) {
|
|
||||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
|
||||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
|
||||||
dest->dirty = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//assign the right code to your layers for OLED display
|
|
||||||
#define L_BASE 0
|
|
||||||
#define L_LOWER (1<<_LOWER)
|
|
||||||
#define L_RAISE (1<<_RAISE)
|
|
||||||
#define L_ADJUST (1<<_ADJUST)
|
|
||||||
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
|
|
||||||
|
|
||||||
static void render_logo(struct CharacterMatrix *matrix) {
|
|
||||||
|
|
||||||
static const char helix_logo[] PROGMEM ={
|
|
||||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
|
||||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
|
||||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
|
||||||
0};
|
|
||||||
matrix_write_P(matrix, helix_logo);
|
|
||||||
//matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void render_rgbled_status(bool full, struct CharacterMatrix *matrix) {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
char buf[30];
|
|
||||||
if (RGBLIGHT_MODES > 1 && rgblight_config.enable) {
|
|
||||||
if (full) {
|
|
||||||
snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ",
|
|
||||||
rgblight_config.mode,
|
|
||||||
rgblight_config.hue/RGBLIGHT_HUE_STEP,
|
|
||||||
rgblight_config.sat/RGBLIGHT_SAT_STEP,
|
|
||||||
rgblight_config.val/RGBLIGHT_VAL_STEP);
|
|
||||||
} else {
|
|
||||||
snprintf(buf, sizeof(buf), "[%2d] ",rgblight_config.mode);
|
|
||||||
}
|
|
||||||
matrix_write(matrix, buf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void render_layer_status(struct CharacterMatrix *matrix) {
|
|
||||||
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
|
||||||
char buf[10];
|
|
||||||
matrix_write_P(matrix, PSTR("Layer: "));
|
|
||||||
switch (layer_state) {
|
|
||||||
case L_BASE:
|
|
||||||
matrix_write_P(matrix, PSTR("Default"));
|
|
||||||
break;
|
|
||||||
case L_RAISE:
|
|
||||||
matrix_write_P(matrix, PSTR("Raise"));
|
|
||||||
break;
|
|
||||||
case L_LOWER:
|
|
||||||
matrix_write_P(matrix, PSTR("Lower"));
|
|
||||||
break;
|
|
||||||
case L_ADJUST:
|
|
||||||
case L_ADJUST_TRI:
|
|
||||||
matrix_write_P(matrix, PSTR("Adjust"));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
matrix_write_P(matrix, PSTR("Undef-"));
|
|
||||||
snprintf(buf,sizeof(buf), "%ld", layer_state);
|
|
||||||
matrix_write(matrix, buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void render_status(struct CharacterMatrix *matrix) {
|
|
||||||
|
|
||||||
// Render to mode icon
|
|
||||||
static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
|
||||||
if(keymap_config.swap_lalt_lgui==false){
|
|
||||||
matrix_write_P(matrix, os_logo[0][0]);
|
|
||||||
matrix_write_P(matrix, PSTR("\n"));
|
|
||||||
matrix_write_P(matrix, os_logo[0][1]);
|
|
||||||
}else{
|
|
||||||
matrix_write_P(matrix, os_logo[1][0]);
|
|
||||||
matrix_write_P(matrix, PSTR("\n"));
|
|
||||||
matrix_write_P(matrix, os_logo[1][1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_write_P(matrix, PSTR(" "));
|
|
||||||
render_layer_status(matrix);
|
|
||||||
matrix_write_P(matrix, PSTR("\n"));
|
|
||||||
|
|
||||||
// Host Keyboard LED Status
|
|
||||||
matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ?
|
|
||||||
PSTR("NUMLOCK") : PSTR(" "));
|
|
||||||
matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ?
|
|
||||||
PSTR("CAPS") : PSTR(" "));
|
|
||||||
matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ?
|
|
||||||
PSTR("SCLK") : PSTR(" "));
|
|
||||||
matrix_write_P(matrix, PSTR("\n"));
|
|
||||||
render_rgbled_status(true, matrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void iota_gfx_task_user(void) {
|
|
||||||
struct CharacterMatrix matrix;
|
|
||||||
|
|
||||||
#if DEBUG_TO_SCREEN
|
|
||||||
if (debug_enable) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
matrix_clear(&matrix);
|
|
||||||
if(is_master){
|
|
||||||
render_status(&matrix);
|
|
||||||
}else{
|
|
||||||
render_logo(&matrix);
|
|
||||||
render_rgbled_status(false, &matrix);
|
|
||||||
render_layer_status(&matrix);
|
|
||||||
}
|
|
||||||
matrix_update(&display, &matrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
/* Copyright 2020 yushakobo
|
||||||
|
*
|
||||||
|
* 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 <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
#include "ssd1306.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_number {
|
||||||
|
_QWERTY = 0,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||||
|
#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE)
|
||||||
|
|
||||||
|
# if defined(OLED_DRIVER_ENABLE)
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
return OLED_ROTATION_0;
|
||||||
|
} else {
|
||||||
|
return OLED_ROTATION_180;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
# define oled_write(data,flag) matrix_write(matrix, data)
|
||||||
|
# define oled_write_P(data,flag) matrix_write_P(matrix, data)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
iota_gfx_task(); // this is what updates the display continuously
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_update(struct CharacterMatrix *dest,
|
||||||
|
const struct CharacterMatrix *source) {
|
||||||
|
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||||
|
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||||
|
dest->dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
//assign the right code to your layers for OLED display
|
||||||
|
#define L_BASE 0
|
||||||
|
#define L_LOWER (1<<_LOWER)
|
||||||
|
#define L_RAISE (1<<_RAISE)
|
||||||
|
#define L_ADJUST (1<<_ADJUST)
|
||||||
|
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
|
||||||
|
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
static void render_logo(struct CharacterMatrix *matrix) {
|
||||||
|
# else
|
||||||
|
static void render_logo(void) {
|
||||||
|
# endif
|
||||||
|
|
||||||
|
static const char helix_logo[] PROGMEM ={
|
||||||
|
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||||
|
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||||
|
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||||
|
0};
|
||||||
|
oled_write_P(helix_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
static void render_rgbled_status(bool full, struct CharacterMatrix *matrix) {
|
||||||
|
# else
|
||||||
|
static void render_rgbled_status(bool full) {
|
||||||
|
# endif
|
||||||
|
# ifdef RGBLIGHT_ENABLE
|
||||||
|
char buf[30];
|
||||||
|
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) {
|
||||||
|
if (full) {
|
||||||
|
snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ",
|
||||||
|
rgblight_get_mode(),
|
||||||
|
rgblight_get_hue()/RGBLIGHT_HUE_STEP,
|
||||||
|
rgblight_get_sat()/RGBLIGHT_SAT_STEP,
|
||||||
|
rgblight_get_val()/RGBLIGHT_VAL_STEP);
|
||||||
|
} else {
|
||||||
|
snprintf(buf, sizeof(buf), "[%2d] ", rgblight_get_mode());
|
||||||
|
}
|
||||||
|
oled_write(buf, false);
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
static void render_layer_status(struct CharacterMatrix *matrix) {
|
||||||
|
# else
|
||||||
|
static void render_layer_status(void) {
|
||||||
|
# endif
|
||||||
|
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
|
||||||
|
char buf[10];
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
switch (layer_state) {
|
||||||
|
case L_BASE:
|
||||||
|
oled_write_P(PSTR("Default"), false);
|
||||||
|
break;
|
||||||
|
case L_RAISE:
|
||||||
|
oled_write_P(PSTR("Raise"), false);
|
||||||
|
break;
|
||||||
|
case L_LOWER:
|
||||||
|
oled_write_P(PSTR("Lower"), false);
|
||||||
|
break;
|
||||||
|
case L_ADJUST:
|
||||||
|
case L_ADJUST_TRI:
|
||||||
|
oled_write_P(PSTR("Adjust"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_P(PSTR("Undef-"), false);
|
||||||
|
snprintf(buf,sizeof(buf), "%ld", layer_state);
|
||||||
|
oled_write(buf, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
void render_status(struct CharacterMatrix *matrix) {
|
||||||
|
# else
|
||||||
|
void render_status(void) {
|
||||||
|
# endif
|
||||||
|
// Render to mode icon
|
||||||
|
static const char os_logo[][2][3] PROGMEM = {{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||||
|
if (is_mac_mode()) {
|
||||||
|
oled_write_P(os_logo[0][0], false);
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
oled_write_P(os_logo[0][1], false);
|
||||||
|
} else {
|
||||||
|
oled_write_P(os_logo[1][0], false);
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
oled_write_P(os_logo[1][1], false);
|
||||||
|
}
|
||||||
|
|
||||||
|
oled_write_P(PSTR(" "), false);
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
render_layer_status(matrix);
|
||||||
|
# else
|
||||||
|
render_layer_status();
|
||||||
|
# endif
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
|
||||||
|
// Host Keyboard LED Status
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUMLOCK") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.scroll_lock ? PSTR("SCLK") : PSTR(" "), false);
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
render_rgbled_status(true, matrix);
|
||||||
|
# else
|
||||||
|
render_rgbled_status(true);
|
||||||
|
oled_write_P(PSTR("\n"), false);
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ifdef SSD1306OLED
|
||||||
|
# if OLED_UPDATE_INTERVAL > 0
|
||||||
|
uint16_t oled_update_timeout;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
void iota_gfx_task_user(void) {
|
||||||
|
struct CharacterMatrix matrix;
|
||||||
|
|
||||||
|
# if DEBUG_TO_SCREEN
|
||||||
|
if (debug_enable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#if OLED_UPDATE_INTERVAL > 0
|
||||||
|
if (timer_elapsed(oled_update_timeout) < OLED_UPDATE_INTERVAL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
oled_update_timeout = timer_read();
|
||||||
|
#endif
|
||||||
|
matrix_clear(&matrix);
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
render_status(&matrix);
|
||||||
|
} else {
|
||||||
|
render_logo(&matrix);
|
||||||
|
render_rgbled_status(false, &matrix);
|
||||||
|
render_layer_status(&matrix);
|
||||||
|
}
|
||||||
|
matrix_update(&display, &matrix);
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
void oled_task_user(void) {
|
||||||
|
|
||||||
|
# if DEBUG_TO_SCREEN
|
||||||
|
if (debug_enable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
render_status();
|
||||||
|
} else {
|
||||||
|
render_logo();
|
||||||
|
render_rgbled_status(false);
|
||||||
|
render_layer_status();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
@@ -18,6 +18,18 @@ LTO_ENABLE = no # if firmware size over limit, try this option
|
|||||||
# LED_ANIMATIONS = yes # LED animations
|
# LED_ANIMATIONS = yes # LED animations
|
||||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||||
|
|
||||||
|
# OLED_ENABLE が yes のとき
|
||||||
|
# OLED_SELECT が core ならば QMK 標準の oled_dirver.c を使用します。
|
||||||
|
# OLED_SELECT が core 以外ならば従来どおり helix/local_drivers/ssd1306.c を使用します。
|
||||||
|
# If OLED_ENABLE is 'yes'
|
||||||
|
# If OLED_SELECT is 'core', use QMK standard oled_dirver.c.
|
||||||
|
# If OLED_SELECT is other than 'core', use helix/local_drivers/ssd1306.c.
|
||||||
|
OLED_SELECT = core
|
||||||
|
|
||||||
|
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||||
|
SRC += oled_display.c
|
||||||
|
endif
|
||||||
|
|
||||||
# convert Helix-specific options (that represent combinations of standard options)
|
# convert Helix-specific options (that represent combinations of standard options)
|
||||||
# into QMK standard options.
|
# into QMK standard options.
|
||||||
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
include $(strip $(KEYBOARD_LOCAL_FEATURES_MK))
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "../default/oled_display.c"
|
||||||
@@ -18,6 +18,10 @@ LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
|||||||
LED_ANIMATIONS = yes # LED animations
|
LED_ANIMATIONS = yes # LED animations
|
||||||
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||||
|
|
||||||
|
OLED_SELECT = core
|
||||||
|
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||||
|
SRC += oled_display.c
|
||||||
|
endif
|
||||||
SRC += led_test_init.c
|
SRC += led_test_init.c
|
||||||
|
|
||||||
# convert Helix-specific options (that represent combinations of standard options)
|
# convert Helix-specific options (that represent combinations of standard options)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ KEYBOARD_LOCAL_FEATURES_MK :=
|
|||||||
define HELIX_CUSTOMISE_MSG
|
define HELIX_CUSTOMISE_MSG
|
||||||
$(info Helix Spacific Build Options)
|
$(info Helix Spacific Build Options)
|
||||||
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
$(info - OLED_ENABLE = $(OLED_ENABLE))
|
||||||
|
$(info - OLED_SELECT = $(OLED_SELECT))
|
||||||
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
|
||||||
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
|
||||||
$(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
|
$(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
|
||||||
@@ -20,9 +21,10 @@ endef
|
|||||||
define HELIX_HELP_MSG
|
define HELIX_HELP_MSG
|
||||||
$(info Helix keyboard convenient command line option)
|
$(info Helix keyboard convenient command line option)
|
||||||
$(info - make HELIX=<options> helix:<keymap>)
|
$(info - make HELIX=<options> helix:<keymap>)
|
||||||
$(info - option= oled | no-oled | back | no-back | under | na | no-ani)
|
$(info - option= oled | core-oled | local-oled | no-oled )
|
||||||
$(info - ios | sc | split-common | scan | verbose)
|
$(info - back | no-back | under | na | no-ani )
|
||||||
$(info - ex.)
|
$(info - ios | sc | split-common | scan | verbose)
|
||||||
|
$(info - eg.)
|
||||||
$(info - make HELIX=no-oled helix:<keymap>)
|
$(info - make HELIX=no-oled helix:<keymap>)
|
||||||
$(info - make HELIX=oled,no-back helix:<keymap>)
|
$(info - make HELIX=oled,no-back helix:<keymap>)
|
||||||
$(info - make HELIX=oled,under helix:<keymap>)
|
$(info - make HELIX=oled,under helix:<keymap>)
|
||||||
@@ -32,65 +34,76 @@ define HELIX_HELP_MSG
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(strip $(HELIX)),)
|
ifneq ($(strip $(HELIX)),)
|
||||||
|
define HELIX_OPTION_PARSE
|
||||||
|
# parce 'oled' 'back' 'under' 'ios' etc.
|
||||||
|
$(if $(SHOW_PARCE),$(info parse .$1.)) #debug
|
||||||
|
|
||||||
|
ifeq ($(strip $1),help)
|
||||||
|
HELP=on
|
||||||
|
endif
|
||||||
|
ifneq ($(filter nooled no-oled,$(strip $1)),)
|
||||||
|
OLED_ENABLE = no
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),oled)
|
||||||
|
OLED_ENABLE = yes
|
||||||
|
endif
|
||||||
|
ifneq ($(filter core-oled core_oled newoled new-oled olednew oled-new,$(strip $1)),)
|
||||||
|
OLED_ENABLE = yes
|
||||||
|
OLED_SELECT = core
|
||||||
|
endif
|
||||||
|
ifneq ($(filter local-oled local_oled oldoled old-oled oledold oled-old,$(strip $1)),)
|
||||||
|
OLED_ENABLE = yes
|
||||||
|
OLED_SELECT = local
|
||||||
|
endif
|
||||||
|
ifneq ($(filter noback no-back nounder no-under,$(strip $1)),)
|
||||||
|
LED_BACK_ENABLE = no
|
||||||
|
LED_UNDERGLOW_ENABLE = no
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),back)
|
||||||
|
LED_BACK_ENABLE = yes
|
||||||
|
LED_UNDERGLOW_ENABLE = no
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),under)
|
||||||
|
LED_BACK_ENABLE = no
|
||||||
|
LED_UNDERGLOW_ENABLE = yes
|
||||||
|
endif
|
||||||
|
ifneq ($(filter na no_ani no-ani,$(strip $1)),)
|
||||||
|
LED_ANIMATIONS = no
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),ios)
|
||||||
|
IOS_DEVICE_ENABLE = yes
|
||||||
|
endif
|
||||||
|
ifneq ($(filter sc split-common split_common,$(strip $1)),)
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
|
endif
|
||||||
|
ifneq ($(filter nosc no-sc no-split-common no-split_common,$(strip $1)),)
|
||||||
|
SPLIT_KEYBOARD = no
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),scan)
|
||||||
|
# use DEBUG_MATRIX_SCAN_RATE
|
||||||
|
# see docs/newbs_testing_debugging.md
|
||||||
|
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
SHOW_VERBOSE_INFO = yes
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),verbose)
|
||||||
|
SHOW_VERBOSE_INFO = yes
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $1),lto)
|
||||||
|
LTO_ENABLE = yes
|
||||||
|
endif
|
||||||
|
ifneq ($(filter nolto no-lto no_lto,$(strip $1)),)
|
||||||
|
LTO_ENABLE = no
|
||||||
|
endif
|
||||||
|
endef # end of HELIX_OPTION_PARSE
|
||||||
|
|
||||||
COMMA=,
|
COMMA=,
|
||||||
helix_option := $(subst $(COMMA), , $(HELIX))
|
$(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(HELIX)), \
|
||||||
ifneq ($(filter help,$(helix_option)),)
|
$(call HELIX_OPTION_PARSE,$(A_OPTION_NAME))))
|
||||||
$(eval $(call HELIX_HELP_MSG))
|
|
||||||
$(error )
|
ifeq ($(strip $(HELP)),on)
|
||||||
endif
|
$(eval $(call HELIX_HELP_MSG))
|
||||||
ifneq ($(filter nooled,$(helix_option)),)
|
$(error )
|
||||||
OLED_ENABLE = no
|
|
||||||
else ifneq ($(filter no-oled,$(helix_option)),)
|
|
||||||
OLED_ENABLE = no
|
|
||||||
else ifneq ($(filter oled,$(helix_option)),)
|
|
||||||
OLED_ENABLE = yes
|
|
||||||
endif
|
|
||||||
ifneq ($(filter noback,$(helix_option)),)
|
|
||||||
LED_BACK_ENABLE = no
|
|
||||||
LED_UNDERGLOW_ENABLE = no
|
|
||||||
else ifneq ($(filter no-back,$(helix_option)),)
|
|
||||||
LED_BACK_ENABLE = no
|
|
||||||
LED_UNDERGLOW_ENABLE = no
|
|
||||||
else ifneq ($(filter nounder,$(helix_option)),)
|
|
||||||
LED_BACK_ENABLE = no
|
|
||||||
LED_UNDERGLOW_ENABLE = no
|
|
||||||
else ifneq ($(filter no-under,$(helix_option)),)
|
|
||||||
LED_BACK_ENABLE = no
|
|
||||||
LED_UNDERGLOW_ENABLE = no
|
|
||||||
else ifneq ($(filter back,$(helix_option)),)
|
|
||||||
LED_BACK_ENABLE = yes
|
|
||||||
LED_UNDERGLOW_ENABLE = no
|
|
||||||
else ifneq ($(filter under,$(helix_option)),)
|
|
||||||
LED_BACK_ENABLE = no
|
|
||||||
LED_UNDERGLOW_ENABLE = yes
|
|
||||||
endif
|
|
||||||
ifneq ($(filter na,$(helix_option)),)
|
|
||||||
LED_ANIMATIONS = no
|
|
||||||
endif
|
|
||||||
ifneq ($(filter no_ani,$(helix_option)),)
|
|
||||||
LED_ANIMATIONS = no
|
|
||||||
endif
|
|
||||||
ifneq ($(filter no-ani,$(helix_option)),)
|
|
||||||
LED_ANIMATIONS = no
|
|
||||||
endif
|
|
||||||
ifneq ($(filter ios,$(helix_option)),)
|
|
||||||
IOS_DEVICE_ENABLE = yes
|
|
||||||
endif
|
|
||||||
ifneq ($(filter sc,$(helix_option)),)
|
|
||||||
SPLIT_KEYBOARD = yes
|
|
||||||
endif
|
|
||||||
ifneq ($(filter split-common,$(helix_option)),)
|
|
||||||
SPLIT_KEYBOARD = yes
|
|
||||||
endif
|
|
||||||
ifneq ($(filter scan,$(helix_option)),)
|
|
||||||
# use DEBUG_MATRIX_SCAN_RATE
|
|
||||||
# see docs/newbs_testing_debugging.md
|
|
||||||
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
|
||||||
CONSOLE_ENABLE = yes
|
|
||||||
SHOW_VERBOSE_INFO = yes
|
|
||||||
endif
|
|
||||||
ifeq ($(filter verbose,$(helix_option)), verbose)
|
|
||||||
SHOW_VERBOSE_INFO = yes
|
|
||||||
endif
|
endif
|
||||||
SHOW_HELIX_OPTIONS = yes
|
SHOW_HELIX_OPTIONS = yes
|
||||||
endif
|
endif
|
||||||
@@ -142,12 +155,21 @@ ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||||
SRC += local_drivers/i2c.c
|
ifeq ($(strip $(OLED_SELECT)),core)
|
||||||
SRC += local_drivers/ssd1306.c
|
OLED_DRIVER_ENABLE = yes
|
||||||
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
||||||
OPT_DEFS += -DOLED_ENABLE
|
OPT_DEFS += -DOLED_FONT_H=\<helixfont.h\>
|
||||||
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
else
|
||||||
OPT_DEFS += -DLOCAL_GLCDFONT
|
OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
SRC += local_drivers/i2c.c
|
||||||
|
SRC += local_drivers/ssd1306.c
|
||||||
|
KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
|
||||||
|
OPT_DEFS += -DOLED_ENABLE
|
||||||
|
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
|
||||||
|
OPT_DEFS += -DLOCAL_GLCDFONT
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Helix rev2
|
||||||
|
|
||||||
|
A compact split ortholinear keyboard.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo)
|
||||||
|
* Hardware Supported: Helix rev2 PCBs, Pro Micro
|
||||||
|
* Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make helix/rev2:default:flash
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -18,13 +18,28 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool is_mac_mode(void) {
|
||||||
|
// This is the opposite of the QMK standard, but we'll leave it for backwards compatibility.
|
||||||
|
return keymap_config.swap_lalt_lgui == false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void set_mac_mode_kb(bool macmode) {
|
||||||
|
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI)/AG_SWAP(=MAGIC_SWAP_ALT_GUI) keys.
|
||||||
|
* see
|
||||||
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124
|
||||||
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||||
|
*/
|
||||||
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// Each keymap.c should use is_keyboard_master() instead of is_master.
|
// Each keymap.c should use is_keyboard_master() instead of is_master.
|
||||||
// But keep is_master for a while for backwards compatibility
|
// But keep is_master for a while for backwards compatibility
|
||||||
// for the old keymap.c.
|
// for the old keymap.c.
|
||||||
is_master = is_keyboard_master();
|
is_master = is_keyboard_master();
|
||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#include "helix.h"
|
#include "helix.h"
|
||||||
|
|
||||||
|
bool is_mac_mode(void);
|
||||||
|
void set_mac_mode_kb(bool macmode);
|
||||||
|
|
||||||
#ifndef SPLIT_KEYBOARD
|
#ifndef SPLIT_KEYBOARD
|
||||||
extern bool is_helix_master(void);
|
extern bool is_helix_master(void);
|
||||||
#define is_keyboard_master() is_helix_master()
|
#define is_keyboard_master() is_helix_master()
|
||||||
|
|||||||
@@ -8,3 +8,8 @@ LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
|
|||||||
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
|
||||||
LED_ANIMATIONS = yes # LED animations
|
LED_ANIMATIONS = yes # LED animations
|
||||||
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
|
||||||
|
|
||||||
|
# If OLED_ENABLE is 'yes'
|
||||||
|
# If OLED_SELECT is 'core', use QMK standard oled_dirver.c.
|
||||||
|
# If OLED_SELECT is other than 'core', use helix/local_drivers/ssd1306.c.
|
||||||
|
OLED_SELECT = local
|
||||||
@@ -21,15 +21,13 @@ bool is_mac_mode(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void set_mac_mode(bool macmode) {
|
void set_mac_mode(bool macmode) {
|
||||||
if (macmode) {
|
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI)/AG_SWAP(=MAGIC_SWAP_ALT_GUI) keys.
|
||||||
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI) key. */
|
* see
|
||||||
/* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124 */
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||||
} else {
|
*/
|
||||||
/* The result is the same as pressing the AG_SWAP(=MAGIC_SWAP_ALT_GUI) key. */
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||||
/* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81 */
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dip_switch_update_kb(uint8_t index, bool active) {
|
void dip_switch_update_kb(uint8_t index, bool active) {
|
||||||
|
|||||||
@@ -21,15 +21,13 @@ bool is_mac_mode(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void set_mac_mode(bool macmode) {
|
void set_mac_mode(bool macmode) {
|
||||||
if (macmode) {
|
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI)/AG_SWAP(=MAGIC_SWAP_ALT_GUI) keys.
|
||||||
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI) key. */
|
* see
|
||||||
/* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124 */
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||||
} else {
|
*/
|
||||||
/* The result is the same as pressing the AG_SWAP(=MAGIC_SWAP_ALT_GUI) key. */
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||||
/* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81 */
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dip_switch_update_kb(uint8_t index, bool active) {
|
void dip_switch_update_kb(uint8_t index, bool active) {
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/* Copyright 2020 Alabahuy
|
||||||
|
* 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 0x414C
|
||||||
|
#define PRODUCT_ID 0x0045
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Alabahuy
|
||||||
|
#define PRODUCT Rart45
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 9
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { D1, C3, C1, B1, D0, C2, C0, D7, B0 }
|
||||||
|
#define MATRIX_COL_PINS { D6, D4, B2, B5, B4, B3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define LED_CAPS_LOCK_PIN D5
|
||||||
|
#define LED_PIN_ON_STATE 0
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Rartlice",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "Alabahuy",
|
||||||
|
"width": 13,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [
|
||||||
|
{ "x": 0, "y": 0 },
|
||||||
|
{ "x": 1, "y": 0 },
|
||||||
|
{ "x": 2, "y": 0 },
|
||||||
|
{ "x": 3, "y": 0 },
|
||||||
|
{ "x": 4, "y": 0 },
|
||||||
|
{ "x": 5, "y": 0 },
|
||||||
|
{ "x": 7, "y": 0 },
|
||||||
|
{ "x": 8, "y": 0 },
|
||||||
|
{ "x": 9, "y": 0 },
|
||||||
|
{ "x": 10, "y": 0 },
|
||||||
|
{ "x": 11, "y": 0 },
|
||||||
|
{ "x": 12, "y": 0 },
|
||||||
|
|
||||||
|
{"x": 0, "y": 1 },
|
||||||
|
{"x": 1, "y": 1 },
|
||||||
|
{"x": 2, "y": 1 },
|
||||||
|
{"x": 3, "y": 1 },
|
||||||
|
{"x": 4, "y": 1 },
|
||||||
|
{"x": 5, "y": 1 },
|
||||||
|
{"x": 7, "y": 1 },
|
||||||
|
{"x": 8, "y": 1 },
|
||||||
|
{"x": 9, "y": 1 },
|
||||||
|
{"x": 10, "y": 1 },
|
||||||
|
{"x": 11, "y": 1 },
|
||||||
|
{"x": 12, "y": 1 },
|
||||||
|
|
||||||
|
{"x": 0, "y": 2 },
|
||||||
|
{"x": 1, "y": 2 },
|
||||||
|
{"x": 2, "y": 2 },
|
||||||
|
{"x": 3, "y": 2 },
|
||||||
|
{"x": 4, "y": 2 },
|
||||||
|
{"x": 5, "y": 2 },
|
||||||
|
{"x": 7, "y": 2 },
|
||||||
|
{"x": 8, "y": 2 },
|
||||||
|
{"x": 9, "y": 2 },
|
||||||
|
{"x": 10, "y": 2 },
|
||||||
|
{"x": 11, "y": 2 },
|
||||||
|
{"x": 12, "y": 2 },
|
||||||
|
|
||||||
|
{"x": 0, "y": 3 },
|
||||||
|
{"x": 1, "y": 3 },
|
||||||
|
{"x": 2, "y": 3 },
|
||||||
|
{"x": 3, "y": 3 },
|
||||||
|
{"x": 4, "y": 3 },
|
||||||
|
{"x": 5, "y": 3 },
|
||||||
|
{"x": 7, "y": 3 },
|
||||||
|
{"x": 8, "y": 3 },
|
||||||
|
{"x": 9, "y": 3 },
|
||||||
|
{"x": 10, "y": 3 },
|
||||||
|
{"x": 11, "y": 3 },
|
||||||
|
{"x": 12, "y": 3 },
|
||||||
|
|
||||||
|
{"x": 2.875, "y": 4, "w":1.25},
|
||||||
|
{"x": 4.125, "y": 4, "w":1.25 },
|
||||||
|
{"x": 5.375, "y": 4, "w":2.25 },
|
||||||
|
{"x": 7.625, "y": 4, "w":1.25 },
|
||||||
|
{"x": 8.875, "y": 4, "w":1.25 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2020 Alabahuy
|
||||||
|
* 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_all(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS,
|
||||||
|
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, MO(1), KC_SPC, MO(2), KC_LALT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
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_LCTL, _______, KC_SPC, _______, KC_LALT
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_LCTL, _______, KC_SPC, _______, KC_LALT
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2020 Alabahuy
|
||||||
|
* 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_all(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS,
|
||||||
|
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, MO(1), KC_SPC, MO(2), KC_LALT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
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_LCTL, _______, KC_SPC, _______, KC_LALT
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_LCTL, _______, KC_SPC, _______, KC_LALT
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/* Copyright 2020 Alabahuy
|
||||||
|
* 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 "rart45.h"
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2020 Alabahuy
|
||||||
|
* 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_all( \
|
||||||
|
K00, K40, K01, K41, K02, K42, K03, K43, K04, K44, K05, K45, \
|
||||||
|
K10, K50, K11, K51, K12, K52, K13, K53, K14, K54, K15, K55, \
|
||||||
|
K20, K60, K21, K61, K22, K62, K23, K63, K24, K64, K25, K65, \
|
||||||
|
K30, K70, K31, K71, K32, K72, K33, K73, K34, K74, K35, K75, \
|
||||||
|
K80, K81, K82, K83, K84 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25 }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35 }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45 }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55 }, \
|
||||||
|
{ K60, K61, K62, K63, K64, K65 }, \
|
||||||
|
{ K70, K71, K72, K73, K74, K75 }, \
|
||||||
|
{ K80, K81, K82, K83, K84, KC_NO }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Rart45
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 40% Ergo Layout Mechanical Keyboard with Atmega328p inspired by the Reviung41 by gtips and the Plaid by hsgw, based on [IMKG](https://www.facebook.com/groups/indomechanicalkeyboard/) (Indonesia Mechanical Keyboard Group).
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Alabahuy](https://github.com/alabahuy)
|
||||||
|
* Hardware Supported: RART45 PCB, Mini USB, ATMEGA328p with vusb
|
||||||
|
* Hardware Availability: Private GB
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make rart/rart45:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make rart/rart45:default:flash
|
||||||
|
|
||||||
|
## Bootloader
|
||||||
|
use usbasploader in hgsw repository.
|
||||||
|
https://github.com/hsgw/USBaspLoader/tree/plaid
|
||||||
|
|
||||||
|
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,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega328p
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = USBasp
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
@@ -61,10 +61,7 @@
|
|||||||
|
|
||||||
// I2C EEPROM
|
// I2C EEPROM
|
||||||
// 24LC64
|
// 24LC64
|
||||||
#define EXTERNAL_EEPROM_BYTE_COUNT 65535
|
#define EEPROM_I2C_24LC64
|
||||||
#define EXTERNAL_EEPROM_PAGE_SIZE 32
|
|
||||||
#define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
|
||||||
#define EXTERNAL_EEPROM_WRITE_TIME 5
|
|
||||||
|
|
||||||
// Dynamic EEPROM
|
// Dynamic EEPROM
|
||||||
// Something sensible or else VIA may crash
|
// Something sensible or else VIA may crash
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
from . import api
|
from . import api
|
||||||
from . import docs
|
from . import docs
|
||||||
|
from . import rgb_breathe_table
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
"""Generate rgblight_breathe_table.h
|
||||||
|
"""
|
||||||
|
import math
|
||||||
|
from argparse import ArgumentTypeError
|
||||||
|
|
||||||
|
from milc import cli
|
||||||
|
|
||||||
|
import qmk.path
|
||||||
|
|
||||||
|
|
||||||
|
def breathing_center(value):
|
||||||
|
value = float(value)
|
||||||
|
if value >= 1 and value <= 2.7:
|
||||||
|
return value
|
||||||
|
else:
|
||||||
|
raise ArgumentTypeError('Breathing center must be between 1 and 2.7')
|
||||||
|
|
||||||
|
|
||||||
|
def breathing_max(value):
|
||||||
|
value = int(value)
|
||||||
|
if value in range(0, 256):
|
||||||
|
return value
|
||||||
|
else:
|
||||||
|
raise ArgumentTypeError('Breathing max must be between 0 and 255')
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('-c', '--center', arg_only=True, type=breathing_center, default=1.85, help='The breathing center value, from 1 to 2.7. Default: 1.85')
|
||||||
|
@cli.argument('-m', '--max', arg_only=True, type=breathing_max, default=255, help='The breathing maximum value, from 0 to 255. Default: 255')
|
||||||
|
@cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to')
|
||||||
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help='Quiet mode, only output error messages')
|
||||||
|
@cli.subcommand('Generates an RGB Light breathing table header.')
|
||||||
|
def generate_rgb_breathe_table(cli):
|
||||||
|
"""Generate a rgblight_breathe_table.h file containing a breathing LUT for RGB Lighting (Underglow) feature.
|
||||||
|
"""
|
||||||
|
breathe_values = [0] * 256
|
||||||
|
for pos in range(0, 256):
|
||||||
|
breathe_values[pos] = (int)((math.exp(math.sin((pos/255) * math.pi)) - cli.args.center / math.e) * (cli.args.max / (math.e - 1 / math.e))) # noqa: yapf insists there be no whitespace around /
|
||||||
|
|
||||||
|
values_template = ''
|
||||||
|
for s in range(0, 3):
|
||||||
|
step = 1 << s
|
||||||
|
|
||||||
|
values_template += '#if RGBLIGHT_BREATHE_TABLE_SIZE == {}\n'.format(256 >> s)
|
||||||
|
|
||||||
|
for pos in range(0, 256, step):
|
||||||
|
values_template += ' ' if pos % 8 == 0 else ''
|
||||||
|
values_template += '0x{:02X}'.format(breathe_values[pos])
|
||||||
|
values_template += ',' if (pos + step) < 256 else ''
|
||||||
|
values_template += '\n' if (pos+step) % 8 == 0 else ' ' # noqa: yapf insists there be no whitespace around +
|
||||||
|
|
||||||
|
values_template += '#endif'
|
||||||
|
values_template += '\n\n' if s < 2 else ''
|
||||||
|
|
||||||
|
table_template = '''#pragma once
|
||||||
|
|
||||||
|
#define RGBLIGHT_EFFECT_BREATHE_TABLE
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
// Breathing center: {0:.2f}
|
||||||
|
// Breathing max: {1:d}
|
||||||
|
|
||||||
|
const uint8_t PROGMEM rgblight_effect_breathe_table[] = {{
|
||||||
|
{2}
|
||||||
|
}};
|
||||||
|
|
||||||
|
static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table);
|
||||||
|
'''.format(cli.args.center, cli.args.max, values_template)
|
||||||
|
|
||||||
|
if cli.args.output:
|
||||||
|
cli.args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
if cli.args.output.exists():
|
||||||
|
cli.args.output.replace(cli.args.output.name + '.bak')
|
||||||
|
cli.args.output.write_text(table_template)
|
||||||
|
|
||||||
|
if not cli.args.quiet:
|
||||||
|
cli.log.info('Wrote header to %s.', cli.args.output)
|
||||||
|
else:
|
||||||
|
print(table_template)
|
||||||
@@ -190,3 +190,10 @@ def test_clean():
|
|||||||
result = check_subcommand('clean', '-a')
|
result = check_subcommand('clean', '-a')
|
||||||
check_returncode(result)
|
check_returncode(result)
|
||||||
assert result.stdout.count('done') == 2
|
assert result.stdout.count('done') == 2
|
||||||
|
|
||||||
|
|
||||||
|
def test_generate_rgb_breathe_table():
|
||||||
|
result = check_subcommand("generate-rgb-breathe-table", "-c", "1.2", "-m", "127")
|
||||||
|
check_returncode(result)
|
||||||
|
assert 'Breathing center: 1.2' in result.stdout
|
||||||
|
assert 'Breathing max: 127' in result.stdout
|
||||||
+106
-457
@@ -1,468 +1,117 @@
|
|||||||
#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE
|
#pragma once
|
||||||
|
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_TABLE
|
#define RGBLIGHT_EFFECT_BREATHE_TABLE
|
||||||
|
|
||||||
const uint8_t rgblight_effect_breathe_table[] PROGMEM = {
|
// clang-format off
|
||||||
/* #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 */
|
|
||||||
/* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */
|
|
||||||
|
|
||||||
|
// Breathing center: 1.85
|
||||||
|
// Breathing max: 255
|
||||||
|
|
||||||
|
const uint8_t PROGMEM rgblight_effect_breathe_table[] = {
|
||||||
#if RGBLIGHT_BREATHE_TABLE_SIZE == 256
|
#if RGBLIGHT_BREATHE_TABLE_SIZE == 256
|
||||||
0x22,
|
0x22, 0x23, 0x25, 0x26, 0x28, 0x29, 0x2A, 0x2C,
|
||||||
0x23,
|
0x2D, 0x2F, 0x30, 0x32, 0x33, 0x35, 0x36, 0x38,
|
||||||
0x25,
|
0x3A, 0x3B, 0x3D, 0x3E, 0x40, 0x42, 0x43, 0x45,
|
||||||
0x26,
|
0x47, 0x49, 0x4A, 0x4C, 0x4E, 0x50, 0x51, 0x53,
|
||||||
0x28,
|
0x55, 0x57, 0x59, 0x5A, 0x5C, 0x5E, 0x60, 0x62,
|
||||||
0x29,
|
0x64, 0x66, 0x68, 0x69, 0x6B, 0x6D, 0x6F, 0x71,
|
||||||
0x2a,
|
0x73, 0x75, 0x77, 0x79, 0x7B, 0x7D, 0x7F, 0x81,
|
||||||
0x2c,
|
0x83, 0x85, 0x87, 0x89, 0x8A, 0x8C, 0x8E, 0x90,
|
||||||
0x2d,
|
0x92, 0x94, 0x96, 0x98, 0x9A, 0x9C, 0x9E, 0x9F,
|
||||||
0x2f,
|
0xA1, 0xA3, 0xA5, 0xA7, 0xA8, 0xAA, 0xAC, 0xAE,
|
||||||
0x30,
|
0xAF, 0xB1, 0xB3, 0xB4, 0xB6, 0xB8, 0xB9, 0xBB,
|
||||||
0x32,
|
0xBC, 0xBE, 0xBF, 0xC1, 0xC2, 0xC3, 0xC5, 0xC6,
|
||||||
0x33,
|
0xC7, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xD0,
|
||||||
0x35,
|
0xD1, 0xD2, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
|
||||||
0x36,
|
0xD7, 0xD8, 0xD9, 0xD9, 0xDA, 0xDA, 0xDB, 0xDB,
|
||||||
0x38,
|
0xDB, 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0xDD, 0xDD,
|
||||||
0x3a,
|
0xDD, 0xDD, 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0xDB,
|
||||||
0x3b,
|
0xDB, 0xDB, 0xDA, 0xDA, 0xD9, 0xD9, 0xD8, 0xD7,
|
||||||
0x3d,
|
0xD7, 0xD6, 0xD5, 0xD4, 0xD3, 0xD2, 0xD2, 0xD1,
|
||||||
0x3e,
|
0xD0, 0xCE, 0xCD, 0xCC, 0xCB, 0xCA, 0xC9, 0xC7,
|
||||||
0x40,
|
0xC6, 0xC5, 0xC3, 0xC2, 0xC1, 0xBF, 0xBE, 0xBC,
|
||||||
0x42,
|
0xBB, 0xB9, 0xB8, 0xB6, 0xB4, 0xB3, 0xB1, 0xAF,
|
||||||
0x43,
|
0xAE, 0xAC, 0xAA, 0xA8, 0xA7, 0xA5, 0xA3, 0xA1,
|
||||||
0x45,
|
0x9F, 0x9E, 0x9C, 0x9A, 0x98, 0x96, 0x94, 0x92,
|
||||||
0x47,
|
0x90, 0x8E, 0x8C, 0x8A, 0x89, 0x87, 0x85, 0x83,
|
||||||
0x49,
|
0x81, 0x7F, 0x7D, 0x7B, 0x79, 0x77, 0x75, 0x73,
|
||||||
0x4a,
|
0x71, 0x6F, 0x6D, 0x6B, 0x69, 0x68, 0x66, 0x64,
|
||||||
0x4c,
|
0x62, 0x60, 0x5E, 0x5C, 0x5A, 0x59, 0x57, 0x55,
|
||||||
0x4e,
|
0x53, 0x51, 0x50, 0x4E, 0x4C, 0x4A, 0x49, 0x47,
|
||||||
0x50,
|
0x45, 0x43, 0x42, 0x40, 0x3E, 0x3D, 0x3B, 0x3A,
|
||||||
0x51,
|
0x38, 0x36, 0x35, 0x33, 0x32, 0x30, 0x2F, 0x2D,
|
||||||
0x53,
|
0x2C, 0x2A, 0x29, 0x28, 0x26, 0x25, 0x23, 0x22
|
||||||
0x55,
|
#endif
|
||||||
0x57,
|
|
||||||
0x59,
|
|
||||||
0x5a,
|
|
||||||
0x5c,
|
|
||||||
0x5e,
|
|
||||||
0x60,
|
|
||||||
0x62,
|
|
||||||
0x64,
|
|
||||||
0x66,
|
|
||||||
0x68,
|
|
||||||
0x69,
|
|
||||||
0x6b,
|
|
||||||
0x6d,
|
|
||||||
0x6f,
|
|
||||||
0x71,
|
|
||||||
0x73,
|
|
||||||
0x75,
|
|
||||||
0x77,
|
|
||||||
0x79,
|
|
||||||
0x7b,
|
|
||||||
0x7d,
|
|
||||||
0x7f,
|
|
||||||
0x81,
|
|
||||||
0x83,
|
|
||||||
0x85,
|
|
||||||
0x87,
|
|
||||||
0x89,
|
|
||||||
0x8a,
|
|
||||||
0x8c,
|
|
||||||
0x8e,
|
|
||||||
0x90,
|
|
||||||
0x92,
|
|
||||||
0x94,
|
|
||||||
0x96,
|
|
||||||
0x98,
|
|
||||||
0x9a,
|
|
||||||
0x9c,
|
|
||||||
0x9e,
|
|
||||||
0x9f,
|
|
||||||
0xa1,
|
|
||||||
0xa3,
|
|
||||||
0xa5,
|
|
||||||
0xa7,
|
|
||||||
0xa8,
|
|
||||||
0xaa,
|
|
||||||
0xac,
|
|
||||||
0xae,
|
|
||||||
0xaf,
|
|
||||||
0xb1,
|
|
||||||
0xb3,
|
|
||||||
0xb4,
|
|
||||||
0xb6,
|
|
||||||
0xb8,
|
|
||||||
0xb9,
|
|
||||||
0xbb,
|
|
||||||
0xbc,
|
|
||||||
0xbe,
|
|
||||||
0xbf,
|
|
||||||
0xc1,
|
|
||||||
0xc2,
|
|
||||||
0xc3,
|
|
||||||
0xc5,
|
|
||||||
0xc6,
|
|
||||||
0xc7,
|
|
||||||
0xc9,
|
|
||||||
0xca,
|
|
||||||
0xcb,
|
|
||||||
0xcc,
|
|
||||||
0xcd,
|
|
||||||
0xce,
|
|
||||||
0xd0,
|
|
||||||
0xd1,
|
|
||||||
0xd2,
|
|
||||||
0xd2,
|
|
||||||
0xd3,
|
|
||||||
0xd4,
|
|
||||||
0xd5,
|
|
||||||
0xd6,
|
|
||||||
0xd7,
|
|
||||||
0xd7,
|
|
||||||
0xd8,
|
|
||||||
0xd9,
|
|
||||||
0xd9,
|
|
||||||
0xda,
|
|
||||||
0xda,
|
|
||||||
0xdb,
|
|
||||||
0xdb,
|
|
||||||
0xdb,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdd,
|
|
||||||
0xdd,
|
|
||||||
0xdd,
|
|
||||||
0xdd,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdb,
|
|
||||||
0xdb,
|
|
||||||
0xdb,
|
|
||||||
0xda,
|
|
||||||
0xda,
|
|
||||||
0xd9,
|
|
||||||
0xd9,
|
|
||||||
0xd8,
|
|
||||||
0xd7,
|
|
||||||
0xd7,
|
|
||||||
0xd6,
|
|
||||||
0xd5,
|
|
||||||
0xd4,
|
|
||||||
0xd3,
|
|
||||||
0xd2,
|
|
||||||
0xd2,
|
|
||||||
0xd1,
|
|
||||||
0xd0,
|
|
||||||
0xce,
|
|
||||||
0xcd,
|
|
||||||
0xcc,
|
|
||||||
0xcb,
|
|
||||||
0xca,
|
|
||||||
0xc9,
|
|
||||||
0xc7,
|
|
||||||
0xc6,
|
|
||||||
0xc5,
|
|
||||||
0xc3,
|
|
||||||
0xc2,
|
|
||||||
0xc1,
|
|
||||||
0xbf,
|
|
||||||
0xbe,
|
|
||||||
0xbc,
|
|
||||||
0xbb,
|
|
||||||
0xb9,
|
|
||||||
0xb8,
|
|
||||||
0xb6,
|
|
||||||
0xb4,
|
|
||||||
0xb3,
|
|
||||||
0xb1,
|
|
||||||
0xaf,
|
|
||||||
0xae,
|
|
||||||
0xac,
|
|
||||||
0xaa,
|
|
||||||
0xa8,
|
|
||||||
0xa7,
|
|
||||||
0xa5,
|
|
||||||
0xa3,
|
|
||||||
0xa1,
|
|
||||||
0x9f,
|
|
||||||
0x9e,
|
|
||||||
0x9c,
|
|
||||||
0x9a,
|
|
||||||
0x98,
|
|
||||||
0x96,
|
|
||||||
0x94,
|
|
||||||
0x92,
|
|
||||||
0x90,
|
|
||||||
0x8e,
|
|
||||||
0x8c,
|
|
||||||
0x8a,
|
|
||||||
0x89,
|
|
||||||
0x87,
|
|
||||||
0x85,
|
|
||||||
0x83,
|
|
||||||
0x81,
|
|
||||||
0x7f,
|
|
||||||
0x7d,
|
|
||||||
0x7b,
|
|
||||||
0x79,
|
|
||||||
0x77,
|
|
||||||
0x75,
|
|
||||||
0x73,
|
|
||||||
0x71,
|
|
||||||
0x6f,
|
|
||||||
0x6d,
|
|
||||||
0x6b,
|
|
||||||
0x69,
|
|
||||||
0x68,
|
|
||||||
0x66,
|
|
||||||
0x64,
|
|
||||||
0x62,
|
|
||||||
0x60,
|
|
||||||
0x5e,
|
|
||||||
0x5c,
|
|
||||||
0x5a,
|
|
||||||
0x59,
|
|
||||||
0x57,
|
|
||||||
0x55,
|
|
||||||
0x53,
|
|
||||||
0x51,
|
|
||||||
0x50,
|
|
||||||
0x4e,
|
|
||||||
0x4c,
|
|
||||||
0x4a,
|
|
||||||
0x49,
|
|
||||||
0x47,
|
|
||||||
0x45,
|
|
||||||
0x43,
|
|
||||||
0x42,
|
|
||||||
0x40,
|
|
||||||
0x3e,
|
|
||||||
0x3d,
|
|
||||||
0x3b,
|
|
||||||
0x3a,
|
|
||||||
0x38,
|
|
||||||
0x36,
|
|
||||||
0x35,
|
|
||||||
0x33,
|
|
||||||
0x32,
|
|
||||||
0x30,
|
|
||||||
0x2f,
|
|
||||||
0x2d,
|
|
||||||
0x2c,
|
|
||||||
0x2a,
|
|
||||||
0x29,
|
|
||||||
0x28,
|
|
||||||
0x26,
|
|
||||||
0x25,
|
|
||||||
0x23,
|
|
||||||
0x22
|
|
||||||
#endif /* 256 bytes table */
|
|
||||||
|
|
||||||
#if RGBLIGHT_BREATHE_TABLE_SIZE == 128
|
#if RGBLIGHT_BREATHE_TABLE_SIZE == 128
|
||||||
0x22,
|
0x22, 0x25, 0x28, 0x2A,
|
||||||
0x25,
|
0x2D, 0x30, 0x33, 0x36,
|
||||||
0x28,
|
0x3A, 0x3D, 0x40, 0x43,
|
||||||
0x2a,
|
0x47, 0x4A, 0x4E, 0x51,
|
||||||
0x2d,
|
0x55, 0x59, 0x5C, 0x60,
|
||||||
0x30,
|
0x64, 0x68, 0x6B, 0x6F,
|
||||||
0x33,
|
0x73, 0x77, 0x7B, 0x7F,
|
||||||
0x36,
|
0x83, 0x87, 0x8A, 0x8E,
|
||||||
0x3a,
|
0x92, 0x96, 0x9A, 0x9E,
|
||||||
0x3d,
|
0xA1, 0xA5, 0xA8, 0xAC,
|
||||||
0x40,
|
0xAF, 0xB3, 0xB6, 0xB9,
|
||||||
0x43,
|
0xBC, 0xBF, 0xC2, 0xC5,
|
||||||
0x47,
|
0xC7, 0xCA, 0xCC, 0xCE,
|
||||||
0x4a,
|
0xD1, 0xD2, 0xD4, 0xD6,
|
||||||
0x4e,
|
0xD7, 0xD9, 0xDA, 0xDB,
|
||||||
0x51,
|
0xDB, 0xDC, 0xDC, 0xDD,
|
||||||
0x55,
|
0xDD, 0xDC, 0xDC, 0xDC,
|
||||||
0x59,
|
0xDB, 0xDA, 0xD9, 0xD8,
|
||||||
0x5c,
|
0xD7, 0xD5, 0xD3, 0xD2,
|
||||||
0x60,
|
0xD0, 0xCD, 0xCB, 0xC9,
|
||||||
0x64,
|
0xC6, 0xC3, 0xC1, 0xBE,
|
||||||
0x68,
|
0xBB, 0xB8, 0xB4, 0xB1,
|
||||||
0x6b,
|
0xAE, 0xAA, 0xA7, 0xA3,
|
||||||
0x6f,
|
0x9F, 0x9C, 0x98, 0x94,
|
||||||
0x73,
|
0x90, 0x8C, 0x89, 0x85,
|
||||||
0x77,
|
0x81, 0x7D, 0x79, 0x75,
|
||||||
0x7b,
|
0x71, 0x6D, 0x69, 0x66,
|
||||||
0x7f,
|
0x62, 0x5E, 0x5A, 0x57,
|
||||||
0x83,
|
0x53, 0x50, 0x4C, 0x49,
|
||||||
0x87,
|
0x45, 0x42, 0x3E, 0x3B,
|
||||||
0x8a,
|
0x38, 0x35, 0x32, 0x2F,
|
||||||
0x8e,
|
0x2C, 0x29, 0x26, 0x23
|
||||||
0x92,
|
#endif
|
||||||
0x96,
|
|
||||||
0x9a,
|
|
||||||
0x9e,
|
|
||||||
0xa1,
|
|
||||||
0xa5,
|
|
||||||
0xa8,
|
|
||||||
0xac,
|
|
||||||
0xaf,
|
|
||||||
0xb3,
|
|
||||||
0xb6,
|
|
||||||
0xb9,
|
|
||||||
0xbc,
|
|
||||||
0xbf,
|
|
||||||
0xc2,
|
|
||||||
0xc5,
|
|
||||||
0xc7,
|
|
||||||
0xca,
|
|
||||||
0xcc,
|
|
||||||
0xce,
|
|
||||||
0xd1,
|
|
||||||
0xd2,
|
|
||||||
0xd4,
|
|
||||||
0xd6,
|
|
||||||
0xd7,
|
|
||||||
0xd9,
|
|
||||||
0xda,
|
|
||||||
0xdb,
|
|
||||||
0xdb,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdd,
|
|
||||||
0xdd,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdc,
|
|
||||||
0xdb,
|
|
||||||
0xda,
|
|
||||||
0xd9,
|
|
||||||
0xd8,
|
|
||||||
0xd7,
|
|
||||||
0xd5,
|
|
||||||
0xd3,
|
|
||||||
0xd2,
|
|
||||||
0xd0,
|
|
||||||
0xcd,
|
|
||||||
0xcb,
|
|
||||||
0xc9,
|
|
||||||
0xc6,
|
|
||||||
0xc3,
|
|
||||||
0xc1,
|
|
||||||
0xbe,
|
|
||||||
0xbb,
|
|
||||||
0xb8,
|
|
||||||
0xb4,
|
|
||||||
0xb1,
|
|
||||||
0xae,
|
|
||||||
0xaa,
|
|
||||||
0xa7,
|
|
||||||
0xa3,
|
|
||||||
0x9f,
|
|
||||||
0x9c,
|
|
||||||
0x98,
|
|
||||||
0x94,
|
|
||||||
0x90,
|
|
||||||
0x8c,
|
|
||||||
0x89,
|
|
||||||
0x85,
|
|
||||||
0x81,
|
|
||||||
0x7d,
|
|
||||||
0x79,
|
|
||||||
0x75,
|
|
||||||
0x71,
|
|
||||||
0x6d,
|
|
||||||
0x69,
|
|
||||||
0x66,
|
|
||||||
0x62,
|
|
||||||
0x5e,
|
|
||||||
0x5a,
|
|
||||||
0x57,
|
|
||||||
0x53,
|
|
||||||
0x50,
|
|
||||||
0x4c,
|
|
||||||
0x49,
|
|
||||||
0x45,
|
|
||||||
0x42,
|
|
||||||
0x3e,
|
|
||||||
0x3b,
|
|
||||||
0x38,
|
|
||||||
0x35,
|
|
||||||
0x32,
|
|
||||||
0x2f,
|
|
||||||
0x2c,
|
|
||||||
0x29,
|
|
||||||
0x26,
|
|
||||||
0x23
|
|
||||||
#endif /* 128 bytes table */
|
|
||||||
|
|
||||||
#if RGBLIGHT_BREATHE_TABLE_SIZE == 64
|
#if RGBLIGHT_BREATHE_TABLE_SIZE == 64
|
||||||
0x22,
|
0x22, 0x28,
|
||||||
0x28,
|
0x2D, 0x33,
|
||||||
0x2d,
|
0x3A, 0x40,
|
||||||
0x33,
|
0x47, 0x4E,
|
||||||
0x3a,
|
0x55, 0x5C,
|
||||||
0x40,
|
0x64, 0x6B,
|
||||||
0x47,
|
0x73, 0x7B,
|
||||||
0x4e,
|
0x83, 0x8A,
|
||||||
0x55,
|
0x92, 0x9A,
|
||||||
0x5c,
|
0xA1, 0xA8,
|
||||||
0x64,
|
0xAF, 0xB6,
|
||||||
0x6b,
|
0xBC, 0xC2,
|
||||||
0x73,
|
0xC7, 0xCC,
|
||||||
0x7b,
|
0xD1, 0xD4,
|
||||||
0x83,
|
0xD7, 0xDA,
|
||||||
0x8a,
|
0xDB, 0xDC,
|
||||||
0x92,
|
0xDD, 0xDC,
|
||||||
0x9a,
|
0xDB, 0xD9,
|
||||||
0xa1,
|
0xD7, 0xD3,
|
||||||
0xa8,
|
0xD0, 0xCB,
|
||||||
0xaf,
|
0xC6, 0xC1,
|
||||||
0xb6,
|
0xBB, 0xB4,
|
||||||
0xbc,
|
0xAE, 0xA7,
|
||||||
0xc2,
|
0x9F, 0x98,
|
||||||
0xc7,
|
0x90, 0x89,
|
||||||
0xcc,
|
0x81, 0x79,
|
||||||
0xd1,
|
0x71, 0x69,
|
||||||
0xd4,
|
0x62, 0x5A,
|
||||||
0xd7,
|
0x53, 0x4C,
|
||||||
0xda,
|
0x45, 0x3E,
|
||||||
0xdb,
|
0x38, 0x32,
|
||||||
0xdc,
|
0x2C, 0x26
|
||||||
0xdd,
|
#endif
|
||||||
0xdc,
|
|
||||||
0xdb,
|
|
||||||
0xd9,
|
|
||||||
0xd7,
|
|
||||||
0xd3,
|
|
||||||
0xd0,
|
|
||||||
0xcb,
|
|
||||||
0xc6,
|
|
||||||
0xc1,
|
|
||||||
0xbb,
|
|
||||||
0xb4,
|
|
||||||
0xae,
|
|
||||||
0xa7,
|
|
||||||
0x9f,
|
|
||||||
0x98,
|
|
||||||
0x90,
|
|
||||||
0x89,
|
|
||||||
0x81,
|
|
||||||
0x79,
|
|
||||||
0x71,
|
|
||||||
0x69,
|
|
||||||
0x62,
|
|
||||||
0x5a,
|
|
||||||
0x53,
|
|
||||||
0x4c,
|
|
||||||
0x45,
|
|
||||||
0x3e,
|
|
||||||
0x38,
|
|
||||||
0x32,
|
|
||||||
0x2c,
|
|
||||||
0x26
|
|
||||||
#endif /* 64 bytes table */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table);
|
static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table);
|
||||||
|
|
||||||
#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */
|
|
||||||
+10
-3
@@ -1,24 +1,29 @@
|
|||||||
BOOTMAGIC = lite
|
BOOTMAGIC_ENABLE = lite
|
||||||
DYNAMIC_KEYMAP_ENABLE = no
|
DYNAMIC_KEYMAP_ENABLE = no
|
||||||
CONSOLE_ENABLE = yes
|
|
||||||
COMMAND_ENABLE = yes
|
|
||||||
LTO_ENABLE = yes
|
LTO_ENABLE = yes
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
|
|
||||||
# only enable audio on specific boards
|
# only enable audio on specific boards
|
||||||
ifeq ($(strip $(KEYBOARD)), evyd13/plain60)
|
ifeq ($(strip $(KEYBOARD)), evyd13/plain60)
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(KEYBOARD)), clueboard/60)
|
ifeq ($(strip $(KEYBOARD)), clueboard/60)
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(KEYBOARD)), hadron/ver3)
|
ifeq ($(strip $(KEYBOARD)), hadron/ver3)
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(KEYBOARD)), fruity60)
|
ifeq ($(strip $(KEYBOARD)), fruity60)
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
COMMAND_ENABLE = no
|
COMMAND_ENABLE = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -28,4 +33,6 @@ endif
|
|||||||
|
|
||||||
ifeq ($(strip $(KEYBOARD)), ai03/polaris)
|
ifeq ($(strip $(KEYBOARD)), ai03/polaris)
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = yes
|
||||||
|
COMMAND_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
//
|
|
||||||
// calculate rgblight_effect_breathe_table[] values
|
|
||||||
//
|
|
||||||
// this is host program for quantum/rgblight.c:void rgblight_effect_breathing();
|
|
||||||
//
|
|
||||||
// example:
|
|
||||||
// $ edit util/rgblight_breathing_table_calc.c
|
|
||||||
// $ cc -o util/rgblight_breathing_table_calc util/rgblight_breathing_table_calc.c
|
|
||||||
// $ ./util/rgblight_breathing_table_calc > keyboards/KEYBOARD_NAME/keymaps/KEYMAP_NAME/rgblight_breathe_table.h
|
|
||||||
//
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/// customize breeathing effect part ///////////////////////////
|
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
int main(void) {
|
|
||||||
int pos, step;
|
|
||||||
int table[256];
|
|
||||||
for (pos = 0; pos < 256; pos ++ ) {
|
|
||||||
table[pos] = (uint8_t)(
|
|
||||||
(exp(sin((pos/255.0)*M_PI))- RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)
|
|
||||||
* (RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
printf("#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE\n");
|
|
||||||
printf("#define RGBLIGHT_EFFECT_BREATHE_TABLE\n\n");
|
|
||||||
printf("const uint8_t rgblight_effect_breathe_table[] PROGMEM = {\n");
|
|
||||||
printf(" /* #define RGBLIGHT_EFFECT_BREATHE_CENTER %.2f */\n", RGBLIGHT_EFFECT_BREATHE_CENTER);
|
|
||||||
printf(" /* #define RGBLIGHT_EFFECT_BREATHE_MAX %d */\n", RGBLIGHT_EFFECT_BREATHE_MAX);
|
|
||||||
|
|
||||||
for (int s = 0, step = (1<<s); s < 3 ; s += 1, step = (1<<s) ) {
|
|
||||||
printf("\n #if RGBLIGHT_BREATHE_TABLE_SIZE == %d\n",
|
|
||||||
s == 0 ? 256:(s== 1 ? 128: 64));
|
|
||||||
for (pos = 0; pos < 256; pos += step ) {
|
|
||||||
printf(" 0x%x%s", table[pos], (pos+step)>=256?"":"," );
|
|
||||||
if ((pos+step) % 8 == 0)
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
printf(" #endif /* %d bytes table */\n", s == 0 ? 256:(s== 1 ? 128: 64));
|
|
||||||
}
|
|
||||||
printf("};\n");
|
|
||||||
printf("\nstatic const int table_scale = 256/sizeof(rgblight_effect_breathe_table);\n");
|
|
||||||
printf("\n#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user