Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
716c29881c | ||
|
|
f76f9c7d2a | ||
|
|
530c997638 | ||
|
|
b353028ea5 | ||
|
|
eb9c2429c6 | ||
|
|
1327208449 | ||
|
|
d99404388f | ||
|
|
3157f5f436 | ||
|
|
8d11359886 | ||
|
|
a4af41cb13 | ||
|
|
032fbf3f24 | ||
|
|
a7d859dab8 | ||
|
|
1751c3cc25 | ||
|
|
67ee050a0e | ||
|
|
562482c234 | ||
|
|
66d7fc34b2 | ||
|
|
81423cc817 |
+24
-2
@@ -71,14 +71,36 @@ There are some limitations to the local CLI compared to the global CLI:
|
|||||||
|
|
||||||
## `qmk cformat`
|
## `qmk cformat`
|
||||||
|
|
||||||
This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.
|
This command formats C code using clang-format.
|
||||||
|
|
||||||
**Usage**:
|
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
|
||||||
|
|
||||||
|
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
|
||||||
|
|
||||||
|
**Usage for specified files**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk cformat [file1] [file2] [...] [fileN]
|
qmk cformat [file1] [file2] [...] [fileN]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Usage for all core files**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -a
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for only changed files against origin/master**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for only changed files against branch_name**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -b branch_name
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk compile`
|
## `qmk compile`
|
||||||
|
|
||||||
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
|
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ SEND_STRING(".."SS_TAP(X_END));
|
|||||||
|
|
||||||
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||||
|
|
||||||
|
?> You can also use the functions described in [Useful function](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro.
|
||||||
|
|
||||||
### `record->event.pressed`
|
### `record->event.pressed`
|
||||||
|
|
||||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||||
|
|||||||
+12
-51
@@ -29,6 +29,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
static uint8_t i2c_address;
|
||||||
|
|
||||||
static const I2CConfig i2cconfig = {
|
static const I2CConfig i2cconfig = {
|
||||||
#ifdef USE_I2CV1
|
#ifdef USE_I2CV1
|
||||||
I2C1_OPMODE,
|
I2C1_OPMODE,
|
||||||
@@ -69,49 +71,27 @@ __attribute__((weak)) void i2c_init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_start(uint8_t address) {
|
i2c_status_t i2c_start(uint8_t address) {
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
i2c_address = address;
|
||||||
i2cAcquireBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
return I2C_STATUS_SUCCESS;
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
i2c_address = address;
|
||||||
i2cAcquireBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (address >> 1), data, length, 0, 0, MS2ST(timeout));
|
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
|
||||||
|
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
|
||||||
i2cReleaseBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
|
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
i2c_address = address;
|
||||||
i2cAcquireBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (address >> 1), data, length, MS2ST(timeout));
|
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
|
||||||
|
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
|
||||||
i2cReleaseBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
i2c_address = devaddr;
|
||||||
i2cAcquireBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
|
|
||||||
uint8_t complete_packet[length + 1];
|
uint8_t complete_packet[length + 1];
|
||||||
@@ -120,34 +100,15 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data,
|
|||||||
}
|
}
|
||||||
complete_packet[0] = regaddr;
|
complete_packet[0] = regaddr;
|
||||||
|
|
||||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
|
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
|
||||||
|
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
|
||||||
i2cReleaseBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
|
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
i2c_address = devaddr;
|
||||||
i2cAcquireBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), ®addr, 1, data, length, MS2ST(timeout));
|
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout));
|
||||||
|
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
|
||||||
i2cReleaseBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void i2c_stop(void) {
|
void i2c_stop(void) { i2cStop(&I2C_DRIVER); }
|
||||||
i2cStop(&I2C_DRIVER);
|
|
||||||
|
|
||||||
#if I2C_USE_MUTUAL_EXCLUSION
|
|
||||||
i2cReleaseBus(&I2C_DRIVER);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|||||||
+24
-16
@@ -40,7 +40,10 @@ const unsigned char* fonts_pointer[] = {font5x7, font8x16};
|
|||||||
uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY;
|
uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY;
|
||||||
uint16_t fontMapWidth;
|
uint16_t fontMapWidth;
|
||||||
|
|
||||||
#define _BV(x) (1 << (x))
|
#ifndef _BV
|
||||||
|
# define _BV(x) (1 << (x))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define swap(a, b) \
|
#define swap(a, b) \
|
||||||
{ \
|
{ \
|
||||||
uint8_t t = a; \
|
uint8_t t = a; \
|
||||||
@@ -49,7 +52,7 @@ uint16_t fontMapWidth;
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t micro_oled_transfer_buffer[20];
|
uint8_t micro_oled_transfer_buffer[20];
|
||||||
static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0};
|
static uint8_t micro_oled_screen_current[LCDWIDTH * LCDHEIGHT / 8] = {0};
|
||||||
|
|
||||||
/* LCD Memory organised in 64 horizontal pixel and 6 rows of byte
|
/* LCD Memory organised in 64 horizontal pixel and 6 rows of byte
|
||||||
B B .............B -----
|
B B .............B -----
|
||||||
@@ -69,7 +72,7 @@ static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0};
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if LCDWIDTH == 64
|
#if LCDWIDTH == 64
|
||||||
# if LCDWIDTH == 48
|
# if LCDHEIGHT == 48
|
||||||
static uint8_t micro_oled_screen_buffer[] = {
|
static uint8_t micro_oled_screen_buffer[] = {
|
||||||
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
|
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
|
||||||
// 64x48 image
|
// 64x48 image
|
||||||
@@ -79,32 +82,37 @@ static uint8_t micro_oled_screen_buffer[] = {
|
|||||||
# endif
|
# endif
|
||||||
#elif LCDWIDTH == 128
|
#elif LCDWIDTH == 128
|
||||||
# if LCDHEIGHT == 32
|
# if LCDHEIGHT == 32
|
||||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {
|
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {
|
||||||
// 128x32 qmk image
|
// 128x32 qmk image
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
# elif LCDHEIGHT == 64
|
# elif LCDHEIGHT == 64
|
||||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
// TODO: generate bitmap of QMK logo here
|
// TODO: generate bitmap of QMK logo here
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
// catchall for custom screen szies
|
// catchall for custom screen sizes
|
||||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0};
|
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void micro_oled_init(void) {
|
void micro_oled_init(void) {
|
||||||
i2c_init();
|
i2c_init();
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
|
i2c_start(I2C_ADDRESS_SA0_1, 100);
|
||||||
|
#else
|
||||||
i2c_start(I2C_ADDRESS_SA0_1);
|
i2c_start(I2C_ADDRESS_SA0_1);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Display Init sequence for 64x48 OLED module
|
// Display Init sequence for 64x48 OLED module
|
||||||
send_command(DISPLAYOFF); // 0xAE
|
send_command(DISPLAYOFF); // 0xAE
|
||||||
@@ -205,7 +213,7 @@ void clear_screen(void) {
|
|||||||
*/
|
*/
|
||||||
void clear_buffer(void) {
|
void clear_buffer(void) {
|
||||||
// 384
|
// 384
|
||||||
memset(micro_oled_screen_buffer, 0, LCDWIDTH * LCDWIDTH / 8);
|
memset(micro_oled_screen_buffer, 0, LCDWIDTH * LCDHEIGHT / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Invert display.
|
/** \brief Invert display.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode
|
|||||||
#ifndef LCDWIDTH
|
#ifndef LCDWIDTH
|
||||||
# define LCDWIDTH 64
|
# define LCDWIDTH 64
|
||||||
#endif
|
#endif
|
||||||
#ifndef LCDWIDTH
|
#ifndef LCDHEIGHT
|
||||||
# define LCDHEIGHT 48
|
# define LCDHEIGHT 48
|
||||||
#endif
|
#endif
|
||||||
#define FONTHEADERSIZE 6
|
#define FONTHEADERSIZE 6
|
||||||
@@ -131,4 +131,4 @@ typedef enum CMD {
|
|||||||
CMD_GETLCDHEIGHT, // 16
|
CMD_GETLCDHEIGHT, // 16
|
||||||
CMD_SETCOLOR, // 17
|
CMD_SETCOLOR, // 17
|
||||||
CMD_SETDRAWMODE // 18
|
CMD_SETDRAWMODE // 18
|
||||||
} commCommand_t;
|
} commCommand_t;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ VPATH += keyboards/cannonkeys/stm32f072
|
|||||||
SRC = keyboard.c \
|
SRC = keyboard.c \
|
||||||
led.c
|
led.c
|
||||||
|
|
||||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ VPATH += keyboards/cannonkeys/stm32f072
|
|||||||
SRC = keyboard.c \
|
SRC = keyboard.c \
|
||||||
led.c
|
led.c
|
||||||
|
|
||||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
|||||||
@@ -35,8 +35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 }
|
#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define ENCODERS_PAD_A { B9 }
|
#define ENCODERS_PAD_A { B8 }
|
||||||
#define ENCODERS_PAD_B { B8 }
|
#define ENCODERS_PAD_B { B9 }
|
||||||
|
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
|
|
||||||
//LEDS A6, RGB B15
|
//LEDS A6, RGB B15
|
||||||
#define BACKLIGHT_LEVELS 24
|
#define BACKLIGHT_LEVELS 24
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 4
|
#define MATRIX_ROWS 4
|
||||||
#define MATRIX_COLS 15
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
#define MATRIX_COL_PINS { B14, A14, C13, C14, C15, F0, F1, B9, B8, B7, B6, B5, B4, B3, A15 }
|
#define MATRIX_COL_PINS { B14, A14, B1, C13, C14, C15, F0, F1, B9, B8, B7, B6, B5, B4, B3, A15 }
|
||||||
#define MATRIX_ROW_PINS { A10, A9, A8, B12 }
|
#define MATRIX_ROW_PINS { A10, A9, A8, B12 }
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"height": 4,
|
"height": 4,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_default": {
|
"LAYOUT_default": {
|
||||||
"layout": [{"x":0, "y":0}, {"label":"Tab", "x":1.25, "y":0, "w":1.5}, {"label":"Q", "x":2.75, "y":0}, {"label":"W", "x":3.75, "y":0}, {"label":"E", "x":4.75, "y":0}, {"label":"R", "x":5.75, "y":0}, {"label":"T", "x":6.75, "y":0}, {"label":"Y", "x":7.75, "y":0}, {"label":"U", "x":8.75, "y":0}, {"label":"I", "x":9.75, "y":0}, {"label":"O", "x":10.75, "y":0}, {"label":"P", "x":11.75, "y":0}, {"label":"{", "x":12.75, "y":0}, {"label":"}", "x":13.75, "y":0}, {"label":"Backspace", "x":14.75, "y":0}, {"x":0, "y":1}, {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, {"label":"A", "x":3, "y":1}, {"label":"S", "x":4, "y":1}, {"label":"D", "x":5, "y":1}, {"label":"F", "x":6, "y":1}, {"label":"G", "x":7, "y":1}, {"label":"H", "x":8, "y":1}, {"label":"J", "x":9, "y":1}, {"label":"K", "x":10, "y":1}, {"label":"L", "x":11, "y":1}, {"label":":", "x":12, "y":1}, {"label":"\"", "x":13, "y":1}, {"label":"Enter", "x":14, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":2.25}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"?", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2, "w":1.25}, {"x":14.75, "y":2}, {"x":0, "y":3}, {"label":"Win", "x":3.25, "y":3}, {"label":"Alt", "x":4.25, "y":3, "w":1.5}, {"x":5.75, "y":3, "w":2.25}, {"x":8, "y":3, "w":2.75}, {"label":"Alt", "x":10.75, "y":3, "w":1.5}, {"label":"Menu", "x":12.25, "y":3}]
|
"layout": [{"x":0, "y":0}, {"label":"Tab", "x":1.25, "y":0, "w":1.5}, {"label":"Q", "x":2.75, "y":0}, {"label":"W", "x":3.75, "y":0}, {"label":"E", "x":4.75, "y":0}, {"label":"R", "x":5.75, "y":0}, {"label":"T", "x":6.75, "y":0}, {"label":"Y", "x":7.75, "y":0}, {"label":"U", "x":8.75, "y":0}, {"label":"I", "x":9.75, "y":0}, {"label":"O", "x":10.75, "y":0}, {"label":"P", "x":11.75, "y":0}, {"label":"{", "x":12.75, "y":0}, {"label":"}", "x":13.75, "y":0}, {"label":"Backspace", "x":14.75, "y":0}, {"x":0, "y":1}, {"label":"Caps Lock", "x":1.25, "y":1, "w":1.75}, {"label":"A", "x":3, "y":1}, {"label":"S", "x":4, "y":1}, {"label":"D", "x":5, "y":1}, {"label":"F", "x":6, "y":1}, {"label":"G", "x":7, "y":1}, {"label":"H", "x":8, "y":1}, {"label":"J", "x":9, "y":1}, {"label":"K", "x":10, "y":1}, {"label":"L", "x":11, "y":1}, {"label":":", "x":12, "y":1}, {"label":"\"", "x":13, "y":1}, {"label":"Enter", "x":14, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":1.25}, {"label":"ISO \\", "x":2.5, "y":2}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"?", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2, "w":1.25}, {"x":14.75, "y":2}, {"x":0, "y":3}, {"label":"Win", "x":3.25, "y":3}, {"label":"Alt", "x":4.25, "y":3, "w":1.5}, {"x":5.75, "y":3, "w":2.25}, {"x":8, "y":3, "w":2.75}, {"label":"Alt", "x":10.75, "y":3, "w":1.5}, {"label":"Menu", "x":12.25, "y":3}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,28 +33,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_BASE] = LAYOUT_default(
|
[_BASE] = LAYOUT_default(
|
||||||
BL_INC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
BL_INC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
RGB_MOD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2),
|
RGB_MOD, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2),
|
||||||
RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3)
|
RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3)
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN1] = LAYOUT_default(
|
[_FN1] = LAYOUT_default(
|
||||||
KC_TRNS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL,
|
KC_TRNS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN2] = LAYOUT_default(
|
[_FN2] = LAYOUT_default(
|
||||||
RGB_TOG, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
RGB_TOG, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||||
RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN3] = LAYOUT_default(
|
[_FN3] = LAYOUT_default(
|
||||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,28 +33,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_BASE] = LAYOUT_default(
|
[_BASE] = LAYOUT_default(
|
||||||
BL_INC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
BL_INC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
BL_DEC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
RGB_MOD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2),
|
RGB_MOD, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2),
|
||||||
RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3)
|
RGB_TOG, KC_LALT, KC_LGUI, LT(_FN1, KC_SPC), KC_SPC, KC_RALT, MO(_FN3)
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN1] = LAYOUT_default(
|
[_FN1] = LAYOUT_default(
|
||||||
KC_TRNS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL,
|
KC_TRNS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN2] = LAYOUT_default(
|
[_FN2] = LAYOUT_default(
|
||||||
RGB_TOG, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
RGB_TOG, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
|
||||||
RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
RGB_RMOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN3] = LAYOUT_default(
|
[_FN3] = LAYOUT_default(
|
||||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, 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,13 +3,13 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT_default( \
|
#define LAYOUT_default( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
K000, K001, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
|
K100, K101, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||||
K300, K302, K303, K305, K307, K309, K310 \
|
K300, K303, K304, K306, K308, K310, K311 \
|
||||||
) { \
|
) { \
|
||||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
{ K000, K001, KC_NO, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO}, \
|
{ K100, K101, KC_NO, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, KC_NO }, \
|
||||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO}, \
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO }, \
|
||||||
{ K300, KC_NO, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO} \
|
{ K300, KC_NO, KC_NO, K303, K304, KC_NO, K306, KC_NO, K308, KC_NO, K310, K311, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
# project specific files
|
# MCU name
|
||||||
SRC = matrix.c \
|
MCU = MK20DX256
|
||||||
led.c
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
# - For Infinity KB, SERIES = K20x
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
# Linker script to use
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
@@ -23,32 +13,6 @@ MCU_SERIES = K20x
|
|||||||
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
||||||
MCU_LDSCRIPT = MK20DX256BLDR8
|
MCU_LDSCRIPT = MK20DX256BLDR8
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0 and Infinity 60%
|
|
||||||
# - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox
|
|
||||||
MCU_STARTUP = k20x7
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
# - BOARD =
|
|
||||||
# - PJRC_TEENSY_LC for Teensy LC
|
|
||||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
|
||||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
|
||||||
# - MCHCK_K20 for Infinity KB
|
|
||||||
#BOARD = MCHCK_K20
|
|
||||||
BOARD = PJRC_TEENSY_3_1
|
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
# Vector table for application
|
# Vector table for application
|
||||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||||
@@ -92,4 +56,8 @@ LED_DRIVER = is31fl3731c
|
|||||||
LED_WIDTH = 7
|
LED_WIDTH = 7
|
||||||
LED_HEIGHT = 7
|
LED_HEIGHT = 7
|
||||||
|
|
||||||
|
# project specific files
|
||||||
|
SRC = matrix.c \
|
||||||
|
led.c
|
||||||
|
|
||||||
LAYOUTS = ergodox
|
LAYOUTS = ergodox
|
||||||
|
|||||||
@@ -1,45 +1,5 @@
|
|||||||
## chip/board settings
|
# MCU name
|
||||||
# - the next two should match the directories in
|
MCU = MK20DX256
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
|
||||||
# or <this_dir>/ld/
|
|
||||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
|
||||||
# - LDSCRIPT =
|
|
||||||
# - MKL26Z64 for Teensy LC
|
|
||||||
# - MK20DX128 for Teensy 3.0
|
|
||||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
|
||||||
MCU_LDSCRIPT = MK20DX256
|
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = k20x7
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
# - BOARD =
|
|
||||||
# - PJRC_TEENSY_LC for Teensy LC
|
|
||||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
|
||||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
|
||||||
BOARD = PJRC_TEENSY_3_1
|
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
|
|
||||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||||
|
|||||||
@@ -1,45 +1,5 @@
|
|||||||
## chip/board settings
|
# MCU name
|
||||||
# - the next two should match the directories in
|
MCU = MKL26Z64
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = KL2x
|
|
||||||
|
|
||||||
# Linker script to use
|
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
|
||||||
# or <this_dir>/ld/
|
|
||||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
|
||||||
# - LDSCRIPT =
|
|
||||||
# - MKL26Z64 for Teensy LC
|
|
||||||
# - MK20DX128 for Teensy 3.0
|
|
||||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
|
||||||
MCU_LDSCRIPT = MKL26Z64
|
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = kl2x
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
|
||||||
# or <this_dir>/boards
|
|
||||||
# - BOARD =
|
|
||||||
# - PJRC_TEENSY_LC for Teensy LC
|
|
||||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
|
||||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
|
||||||
BOARD = PJRC_TEENSY_LC
|
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m0plus
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 6
|
|
||||||
|
|
||||||
|
|
||||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
# project specific files
|
# MCU name
|
||||||
SRC = matrix.c \
|
MCU = MK20DX128
|
||||||
led.c \
|
|
||||||
led_controller.c
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
# - For Infinity KB, SERIES = K20x
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
# Linker script to use
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
@@ -23,14 +12,6 @@ MCU_SERIES = K20x
|
|||||||
# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
|
# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
|
||||||
MCU_LDSCRIPT = MK20DX128BLDR4
|
MCU_LDSCRIPT = MK20DX128BLDR4
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0 and Infinity KB
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = k20x5
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||||
# or <this_dir>/boards
|
# or <this_dir>/boards
|
||||||
# - BOARD =
|
# - BOARD =
|
||||||
@@ -40,14 +21,6 @@ MCU_STARTUP = k20x5
|
|||||||
# - MCHCK_K20 for Infinity KB
|
# - MCHCK_K20 for Infinity KB
|
||||||
BOARD = MCHCK_K20
|
BOARD = MCHCK_K20
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
# Vector table for application
|
# Vector table for application
|
||||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||||
@@ -72,6 +45,11 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
|
|
||||||
|
# project specific files
|
||||||
|
SRC = matrix.c \
|
||||||
|
led.c \
|
||||||
|
led_controller.c
|
||||||
|
|
||||||
LAYOUTS = 60_ansi_split_bs_rshift
|
LAYOUTS = 60_ansi_split_bs_rshift
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
# project specific files
|
# MCU name
|
||||||
SRC = matrix.c
|
MCU = MK20DX256
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
# - For Infinity KB, SERIES = K20x
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
# Linker script to use
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
@@ -22,40 +13,12 @@ MCU_SERIES = K20x
|
|||||||
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
||||||
MCU_LDSCRIPT = MK20DX256BLDR8
|
MCU_LDSCRIPT = MK20DX256BLDR8
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0 and Infinity KB
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = k20x7
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||||
# or <this_dir>/boards
|
# or <this_dir>/boards
|
||||||
# - BOARD =
|
|
||||||
# - PJRC_TEENSY_LC for Teensy LC
|
|
||||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
|
||||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
|
||||||
# - MCHCK_K20 for Infinity KB
|
|
||||||
|
|
||||||
# This board was copied from PJRC_TEENSY_3_1. The only difference should be a
|
# This board was copied from PJRC_TEENSY_3_1. The only difference should be a
|
||||||
# hack to ensure the watchdog has started before trying to disable it.
|
# hack to ensure the watchdog has started before trying to disable it.
|
||||||
BOARD = IC_TEENSY_3_1
|
BOARD = IC_TEENSY_3_1
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
# Vector table for application
|
|
||||||
# 0x00000000-0x00001000 area is occupied by bootloader.*/
|
|
||||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
|
||||||
#OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
|
|
||||||
OPT_DEFS =
|
|
||||||
|
|
||||||
DFU_ARGS = -d 1c11:b007
|
DFU_ARGS = -d 1c11:b007
|
||||||
DFU_SUFFIX_ARGS = -p b007 -v 1c11
|
DFU_SUFFIX_ARGS = -p b007 -v 1c11
|
||||||
|
|
||||||
@@ -75,6 +38,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover
|
|||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
DEBUG_ENABLE = yes
|
DEBUG_ENABLE = yes
|
||||||
|
|
||||||
|
# project specific files
|
||||||
|
SRC = matrix.c
|
||||||
|
|
||||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4B42
|
||||||
#define PRODUCT_ID 0x6060
|
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER qmkbuilder
|
#define MANUFACTURER qmkbuilder
|
||||||
#define PRODUCT KBD75
|
#define PRODUCT KBD75
|
||||||
#define DESCRIPTION QMK keyboard firmware for KBD75
|
#define DESCRIPTION QMK keyboard firmware for KBD75
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, MO(1), KC_DEL,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_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, MO(1), 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_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define PRODUCT_ID 0x6061
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PREONIC_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||||
|
SONG(COLEMAK_SOUND), \
|
||||||
|
SONG(DVORAK_SOUND) \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MUSIC_MASK (keycode != KC_NO)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 2
|
||||||
@@ -0,0 +1,307 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "muse.h"
|
||||||
|
|
||||||
|
enum preonic_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
_MOUSE
|
||||||
|
};
|
||||||
|
|
||||||
|
enum preonic_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
EMOJI
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 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 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
// replaced BACKLIT with EMOJI since I have no LEDs
|
||||||
|
[_QWERTY] = LAYOUT_preonic_grid(
|
||||||
|
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,
|
||||||
|
CTL_T(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,
|
||||||
|
EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = LAYOUT_preonic_grid(
|
||||||
|
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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = LAYOUT_preonic_grid(
|
||||||
|
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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT,
|
||||||
|
EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_preonic_grid(
|
||||||
|
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
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | ! | @ | # | $ | % | 6 | 7 | SCLK | UP | PAUS | PGUP |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | LFT | DOWN | RGT | PGDN |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_preonic_grid(
|
||||||
|
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_SLCK, KC_UP, KC_PAUS, KC_PGUP,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,
|
||||||
|
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)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| Mouse| | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT_preonic_grid(
|
||||||
|
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, COLEMAK, DVORAK, _______, _______,
|
||||||
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TG(_MOUSE), _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[_MOUSE] = LAYOUT_preonic_grid(
|
||||||
|
_______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX,
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U,
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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 EMOJI:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
tap_code16(C(G(KC_SPC)));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool muse_mode = false;
|
||||||
|
uint8_t last_muse_note = 0;
|
||||||
|
uint16_t muse_counter = 0;
|
||||||
|
uint8_t muse_offset = 70;
|
||||||
|
uint16_t muse_tempo = 50;
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (muse_mode) {
|
||||||
|
if (IS_LAYER_ON(_RAISE)) {
|
||||||
|
if (clockwise) {
|
||||||
|
muse_offset++;
|
||||||
|
} else {
|
||||||
|
muse_offset--;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
muse_tempo+=1;
|
||||||
|
} else {
|
||||||
|
muse_tempo-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
if (active) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (active) {
|
||||||
|
muse_mode = true;
|
||||||
|
} else {
|
||||||
|
muse_mode = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
if (muse_mode) {
|
||||||
|
if (muse_counter == 0) {
|
||||||
|
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
||||||
|
if (muse_note != last_muse_note) {
|
||||||
|
stop_note(compute_freq_for_midi_note(last_muse_note));
|
||||||
|
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
||||||
|
last_muse_note = muse_note;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
muse_counter = (muse_counter + 1) % muse_tempo;
|
||||||
|
} else {
|
||||||
|
if (muse_counter) {
|
||||||
|
stop_all_notes();
|
||||||
|
muse_counter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RAISE:
|
||||||
|
case LOWER:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Elisiano's Preonic layout - largely based on the Planck's
|
||||||
|
|
||||||
|
All layouts are documented in comments
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SRC += muse.c
|
||||||
@@ -0,0 +1,294 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 SwanMatch
|
||||||
|
|
||||||
|
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 0x16C0
|
||||||
|
#define PRODUCT_ID 0x27DB
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER SwanMatch
|
||||||
|
#define PRODUCT SilverBullet44
|
||||||
|
#define DESCRIPTION Metalical Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 { D4, C6, D7, E6 }
|
||||||
|
#define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
|
||||||
|
#define MASTER_RIGHT
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
//#define RGBLIGHT_SPLIT
|
||||||
|
#define RGBLED_SPLIT {26, 26}
|
||||||
|
#define RGBLED_NUM 52
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
#define DRIVER_LED_TOTAL 52
|
||||||
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
|
||||||
|
|
||||||
|
#define RGB_MATRIX_HUE_STEP 8
|
||||||
|
#define RGB_MATRIX_SAT_STEP 8
|
||||||
|
#define RGB_MATRIX_VAL_STEP 8
|
||||||
|
#define RGB_MATRIX_SPD_STEP 8
|
||||||
|
|
||||||
|
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
|
||||||
|
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
|
|
||||||
|
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
#else
|
||||||
|
#define RGBLIGHT_LED_MAP { 0,1,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,3,4,5,6, \
|
||||||
|
26,27,28,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,29,30,31,32 }
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 150 /* 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 2 // 1 to 2.7
|
||||||
|
#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
/*== customize snake effect ==*/
|
||||||
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH RGBLED_NUM
|
||||||
|
/*== customize knight effect ==*/
|
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 6
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Audio */
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define B6_AUDIO
|
||||||
|
#define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||||
|
#define AUDIO_CLICKY
|
||||||
|
#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 10
|
||||||
|
|
||||||
|
//#define RETRO_TAPPING
|
||||||
|
|
||||||
|
#ifdef MOUSEKEY_ENABLE
|
||||||
|
#define MOUSEKEY_INTERVAL 20
|
||||||
|
#define MOUSEKEY_MAX_SPEED 5
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
# define NO_ACTION_MACRO
|
||||||
|
# define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "SilverBullet44",
|
||||||
|
"url": "https://swanmatch.booth.pm/items/1561270",
|
||||||
|
"maintainer": "swanmatch",
|
||||||
|
"width": 18,
|
||||||
|
"height": 4.5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Tab", "x":0, "y":1.375},
|
||||||
|
{"label":"Q", "x":1, "y":0.75},
|
||||||
|
{"label":"W", "x":2, "y":0.25},
|
||||||
|
{"label":"E", "x":3, "y":0},
|
||||||
|
{"label":"R", "x":4, "y":0.25},
|
||||||
|
{"label":"T", "x":5, "y":0.5},
|
||||||
|
|
||||||
|
{"label":"Y", "x":12, "y":0.5},
|
||||||
|
{"label":"U", "x":13, "y":0.25},
|
||||||
|
{"label":"I", "x":14, "y":0},
|
||||||
|
{"label":"O", "x":15, "y":0.25},
|
||||||
|
{"label":"P", "x":16, "y":0.75},
|
||||||
|
{"label":"=", "x":17, "y":1.375},
|
||||||
|
|
||||||
|
{"label":"Shift", "x":0, "y":2.375},
|
||||||
|
{"label":"A", "x":1, "y":1.75},
|
||||||
|
{"label":"S", "x":2, "y":1.25},
|
||||||
|
{"label":"D", "x":3, "y":1},
|
||||||
|
{"label":"F", "x":4, "y":1.25},
|
||||||
|
{"label":"G", "x":5, "y":1.5},
|
||||||
|
|
||||||
|
{"label":"H", "x":12, "y":1.5},
|
||||||
|
{"label":"J", "x":13, "y":1.25},
|
||||||
|
{"label":"K", "x":14, "y":1},
|
||||||
|
{"label":"L", "x":15, "y":1.25},
|
||||||
|
{"label":":", "x":16, "y":1.75},
|
||||||
|
{"label":"'", "x":17, "y":2.375},
|
||||||
|
|
||||||
|
{"label":"N", "x":12, "y":2.5},
|
||||||
|
{"label":"M", "x":13, "y":2.25},
|
||||||
|
{"label":"<", "x":14, "y":2},
|
||||||
|
{"label":">", "x":15, "y":2.25},
|
||||||
|
{"label":"?", "x":16, "y":2.75},
|
||||||
|
{"label":"-", "x":17, "y":3.375},
|
||||||
|
|
||||||
|
{"label":"Ctrl", "x":0, "y":3.375},
|
||||||
|
{"label":"Z", "x":1, "y":2.75},
|
||||||
|
{"label":"X", "x":2, "y":2.25},
|
||||||
|
{"label":"C", "x":3, "y":2},
|
||||||
|
{"label":"V", "x":4, "y":2.25},
|
||||||
|
{"label":"B", "x":5, "y":2.5},
|
||||||
|
|
||||||
|
{"label":"Alt", "x":4, "y":3.25, "h":1.25},
|
||||||
|
{"label":"BS", "x":5, "y":3.5},
|
||||||
|
{"label":"Space", "x":-0.5, "y":3.5, "h":1.5},
|
||||||
|
{"label":"Num", "x":7, "y":3.25, "h":1.5},
|
||||||
|
|
||||||
|
{"label":"Cursol", "x":-3.0, "y":3.5, "h":1.5},
|
||||||
|
{"label":"Enter", "x":-2, "y":3.5, "h":1.5},
|
||||||
|
{"label":"Del", "x":12, "y":3.5},
|
||||||
|
{"label":"Win", "x":13, "y":3.25, "w":1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
/* Copyright 2020 FKML
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | = |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* |Shift | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | CMD | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - |
|
||||||
|
* `-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
* | CAPS | LOWER| Space/ Bcsp / \ . \ Ent | RAISE|LEDOff|
|
||||||
|
* `----------------------------' '--------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
|
||||||
|
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LCMD, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
|
||||||
|
KC_CLCK, LOWER, KC_SPC, KC_BSPC, KC_DOT, KC_ENT, RAISE, RGB_TOG
|
||||||
|
),
|
||||||
|
|
||||||
|
/* LOWER
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | 1 | 2 | 3 | 4 | 5 | |
|
||||||
|
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||||
|
* | | | | | | |-------.-------. ,---------------| 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* `-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
* | | | / / \ \ | | |
|
||||||
|
* `---------------------------' '--------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
KC_GRV , KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* RAISE
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | | | - | + |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | F6 | F7 | F8 | F9 | F10 | | | | | | [ | ] |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | F11 | F12 | | | |-------.-------. ,---------------| | | Left | Up | Down |Right |
|
||||||
|
* `-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
* | | | / / \ \ | | |
|
||||||
|
* `---------------------------' '--------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_MINS, KC_PLUS,
|
||||||
|
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_LBRC, KC_RBRC,
|
||||||
|
_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* ADJUST
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | | |FrqRst| | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | |
|
||||||
|
* `-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
* | | | / / \ \ | | |
|
||||||
|
* `---------------------------' '--------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, XXXXXXX, XXXXXXX, CK_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||||
|
XXXXXXX, XXXXXXX, MU_TOG, CK_UP, AU_TOG, XXXXXXX, RGB_SPI, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, MU_MOD, CK_DOWN, XXXXXXX, XXXXXXX, RGB_SPD, RGB_RMOD, RGB_VAD, RGB_SAD, RGB_HUD, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
//Following line allows macro to read current RGB settings
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int RGB_current_mode;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
# The default keymap for silverbullet44
|
||||||
|
|
||||||
|
```
|
||||||
|
QWERTY
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| Tab | Q | W | E | R | T | | Y | U | I | O | P | = |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
|Shift | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| CMD | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - |
|
||||||
|
`-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
| CAPS | LOWER| Space/ Bcsp / \ . \ Ent | RAISE|LEDOff|
|
||||||
|
`---------------------------' '--------------------------'
|
||||||
|
|
||||||
|
LOWER
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | | | | | | | 1 | 2 | 3 | 4 | 5 | |
|
||||||
|
|------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||||
|
| | | | | | |-------.-------. ,---------------| 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
`-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
| | | / / \ \ | | |
|
||||||
|
`---------------------------' '--------------------------'
|
||||||
|
|
||||||
|
RAISE
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| | F1 | F2 | F3 | F4 | F5 | | | | | | - | + |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | F6 | F7 | F8 | F9 | F10 | | | | | | [ | ] |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | F11 | F12 | | | |-------.-------. ,---------------| | | Left | Up | Down |Right |
|
||||||
|
`-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
| | | / / \ \ | | |
|
||||||
|
`---------------------------' '--------------------------'
|
||||||
|
|
||||||
|
ADJUST
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| | | |FrqRst| | | | | | | | | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | |
|
||||||
|
`-----------------------------------------/ / / \ \ \-----------------------------------------'
|
||||||
|
| | | / / \ \ | | |
|
||||||
|
`---------------------------' '--------------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
/* Copyright 2019 SwanMatch
|
||||||
|
*
|
||||||
|
* 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 custom_keycodes {
|
||||||
|
// QMKBEST = SAFE_RANGE,
|
||||||
|
// QMKURL
|
||||||
|
//};
|
||||||
|
enum layer {
|
||||||
|
_QWERTY,
|
||||||
|
_CURSOL,
|
||||||
|
_CALC,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
RGBRST = SAFE_RANGE,
|
||||||
|
KC_00,
|
||||||
|
ALTAB
|
||||||
|
};
|
||||||
|
#define CALC LT(_CALC, KC_ESC)
|
||||||
|
#define CUSL LT(_CURSOL, KC_TAB)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* |TabMOS| Q | W | E | R | T | | Y | U | I | O | P | = |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* |Shift | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - |
|
||||||
|
* `-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
* | Alt | Bksp | / Shift / Calc / \ Cursol\ Ctrl | Del | App |
|
||||||
|
* | F5 | |/ Space / Esc / \ Tab \ Enter\ | F12 |
|
||||||
|
* `-----------------------------' '---------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
|
||||||
|
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
|
||||||
|
LALT_T(KC_F5), KC_BSPC, LSFT_T(KC_SPC), CALC, CUSL, LCTL_T(KC_ENT), KC_DEL, GUI_T(KC_F12)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Cursol
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | F1 | F2 | PgUp | F4 | F5 | | F6 | F7 | Up | F9 | F10 |PrtSc |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | ~ | Home | PgDw | End | ( | | ) | Left | Down |Right | F8 | F11 |
|
||||||
|
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||||
|
* | | ` | CLft | F3 | CRgt |SALTAB|-------.-------. ,---------------|ALTTAB| OSL | F8 | OSR | | |
|
||||||
|
* `-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
* | | | / / / \ \ \ | | |
|
||||||
|
* | | |/ / / \ \ \ | | |
|
||||||
|
* `-----------------------------' '-----------------------------'
|
||||||
|
*/
|
||||||
|
[_CURSOL] = LAYOUT(
|
||||||
|
RESET , KC_F1, KC_F2, KC_PGUP, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, RESET,
|
||||||
|
_______, KC_TILD, KC_HOME, KC_PGDN, KC_END, KC_LPRN, KC_RPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_PIPE, KC_F11,
|
||||||
|
_______, KC_GRV, C(KC_LEFT), KC_F3, C(KC_RGHT), S(ALTAB), ALTAB, LCA(KC_LEFT), KC_F8, LCA(KC_RGHT), KC_BSLS, RGBRST,
|
||||||
|
_______, _______, C(KC_SPC), MO(_ADJUST), _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Calculater
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | @ | # | $ | % | [ | | ] | 4 | 5 | 6 | + | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | ^ | & | * | ! | { |-------.-------. ,---------------| } | 1 | 2 | 3 | = | |
|
||||||
|
* `-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
* | | | / / / \ \ \ | | |
|
||||||
|
* | | |/ / / \ \ 0 \ | 00 | . |
|
||||||
|
* `-----------------------------' '------------------------------'
|
||||||
|
*/
|
||||||
|
[_CALC] = LAYOUT(
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, _______,
|
||||||
|
_______, KC_CIRC, KC_AMPR, KC_ASTR, KC_EXLM, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_PEQL, _______,
|
||||||
|
_______, _______, _______, _______, MO(_ADJUST), KC_0, KC_00, KC_PDOT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* ADJUST
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | | |FrqRst| | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | |
|
||||||
|
* `-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
* | | | / / / \ \ \ | | |
|
||||||
|
* | | |/ / / \ \ \ | | |
|
||||||
|
* `-----------------------------' '------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, XXXXXXX, XXXXXXX, CK_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||||
|
XXXXXXX, XXXXXXX, MU_TOG, CK_UP, AU_TOG, XXXXXXX, RGB_SPI, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, MU_MOD, CK_DOWN, XXXXXXX, XXXXXXX, RGB_SPD, RGB_RMOD, RGB_VAD, RGB_SAD, RGB_HUD, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
// Following line allows macro to read current RGB settings
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int RGB_current_mode;
|
||||||
|
bool alt_pressed = false;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
case RGBRST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_update_rgblight_default();
|
||||||
|
rgblight_enable();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case KC_SCLN:
|
||||||
|
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
tap_code16(keycode);
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
}
|
||||||
|
/* } else if (keyboard_report->mods & MOD_BIT(KC_RSFT)) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap_code16(keycode);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} */
|
||||||
|
} else {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
tap_code16(S(keycode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case KC_00:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
tap_code(KC_0);
|
||||||
|
register_code(KC_0);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_0);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case S(ALTAB):
|
||||||
|
case ALTAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!alt_pressed) {
|
||||||
|
alt_pressed = true;
|
||||||
|
register_code(KC_LALT);
|
||||||
|
}
|
||||||
|
if (keycode == S(ALTAB)) {
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
}
|
||||||
|
register_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
if (keycode == S(ALTAB)) {
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (alt_pressed) {
|
||||||
|
alt_pressed = false;
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
if (record->event.pressed) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# The default keymap for silverbullet44
|
||||||
|
|
||||||
|
```
|
||||||
|
QWERTY
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| Tab | Q | W | E | R | T | | Y | U | I | O | P | = |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
|LShift| A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
|LCTRL | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | - |
|
||||||
|
`-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
| Alt | Bksp | / Shift / Calc / \ Cursol\ CTRL | Del | App |
|
||||||
|
| F5 | |/ Space / Esc / \ Tab \ Enter\ | F12 |
|
||||||
|
`-----------------------------' '---------------------------'
|
||||||
|
|
||||||
|
Cursol
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| | F1 | F2 | PgUp | F4 | F5 | | F6 | F7 | Up | F9 | F10 |PrtSc |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | ~ | Home | PgDw | End | ( | | ) | Left | Down |Right | F8 | F11 |
|
||||||
|
|------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||||
|
| | ` | CLft | F3 | CRgt |SALTAB|-------.-------. ,---------------|ALTTAB| OSL | F8 | OSR | | |
|
||||||
|
`-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
| | | / / / \ \ \ | | |
|
||||||
|
| | |/ / / \ \ \ | | |
|
||||||
|
`-----------------------------' '-----------------------------'
|
||||||
|
|
||||||
|
Calculater
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | @ | # | $ | % | [ | | ] | 4 | 5 | 6 | + | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | ^ | & | * | ! | { |-------.-------. ,---------------| } | 1 | 2 | 3 | = | |
|
||||||
|
`-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
| | | / / / \ \ \ | | |
|
||||||
|
| | |/ / / \ \ 0 \ | 00 | . |
|
||||||
|
`-----------------------------' '------------------------------'
|
||||||
|
|
||||||
|
ADJUST
|
||||||
|
,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
| | | |FrqRst| | | | | | | | | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | |Music |FrqUp |Sound | | | SPD+ | MOD+ | VAL+ | SAD+ | HUE+ | |
|
||||||
|
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
| | |Scale |FrqDwn| | |-------.-------. ,---------------| SPD- | SPD- | VAL- | SAD- | HUE- | |
|
||||||
|
`-----------------------------------------/ / / \ \ \----------------------------------------'
|
||||||
|
| | | / / / \ \ \ | | |
|
||||||
|
| | |/ / / \ \ \ | | |
|
||||||
|
`-----------------------------' '------------------------------'
|
||||||
|
```
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# silverbullet44
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A hard keyboard with a hard keystroke that uses aluminum PCB for the top plate.
|
||||||
|
Upgradable from sandwich mount to top mount by using optional parts.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [swan_match](https://github.com/swanmatch/)
|
||||||
|
* Hardware Supported: The PCBs, ProMicro
|
||||||
|
* Hardware Availability: [PCB & Case Data](https://github.com/swanmatch/silverbullet44), [Booth Shop](https://swanmatch.booth.pm/items/1561270)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make silverbullet44:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
[Build guide](https://swanmatch.github.io/silverbullet44/)
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
#RGB_MATRIX_ENABLE = WS2812
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = yes # Audio output on port B6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* Copyright 2019 SwanMatch
|
||||||
|
*
|
||||||
|
* 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 "silverbullet44.h"
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
led_config_t g_led_config = { {
|
||||||
|
// Key Matrix to LED Index
|
||||||
|
{ 18, 7, 6, 0, 1, 2},
|
||||||
|
{ 19, 17, 8, 5, 4, 3},
|
||||||
|
{ 21, 20, 16, 9, 10, 11},
|
||||||
|
{ NO_LED, NO_LED, 15, 14, 13, 12},
|
||||||
|
}, {
|
||||||
|
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
|
||||||
|
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
|
||||||
|
{ 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
|
||||||
|
{ 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
|
||||||
|
{ 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
|
||||||
|
{ 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
|
||||||
|
{ 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
|
||||||
|
{ 16, 24 }, { 16, 7 }, { 0, 7 }
|
||||||
|
}, {
|
||||||
|
2, 2, 2, 2, 2, 2, 1,
|
||||||
|
4, 4, 4, 4, 4, 4, 1,
|
||||||
|
1, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 1, 1, 1, 2,
|
||||||
|
2, 2, 2, 2, 2, 1, 4,
|
||||||
|
4, 4, 4, 4, 4, 1, 1,
|
||||||
|
4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 1
|
||||||
|
} };
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2019 SwanMatch
|
||||||
|
*
|
||||||
|
* 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( \
|
||||||
|
L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \
|
||||||
|
L32, L33, L34, L35, R35, R34, R33, R32 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ KC_NO, KC_NO, L32, L33, L34, L35 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
|
{ KC_NO, KC_NO, R32, R33, R34, R35 } \
|
||||||
|
}
|
||||||
@@ -1,15 +1,5 @@
|
|||||||
# project specific files
|
# MCU name
|
||||||
SRC = matrix.c \
|
MCU = MK20DX256
|
||||||
led.c
|
|
||||||
|
|
||||||
## chip/board settings
|
|
||||||
# - the next two should match the directories in
|
|
||||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
|
||||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
|
||||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
|
||||||
# - For Infinity KB, SERIES = K20x
|
|
||||||
MCU_FAMILY = KINETIS
|
|
||||||
MCU_SERIES = K20x
|
|
||||||
|
|
||||||
# Linker script to use
|
# Linker script to use
|
||||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
@@ -23,14 +13,6 @@ MCU_SERIES = K20x
|
|||||||
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
||||||
MCU_LDSCRIPT = MK20DX256BLDR8
|
MCU_LDSCRIPT = MK20DX256BLDR8
|
||||||
|
|
||||||
# Startup code to use
|
|
||||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
|
||||||
# - STARTUP =
|
|
||||||
# - kl2x for Teensy LC
|
|
||||||
# - k20x5 for Teensy 3.0 and Infinity KB
|
|
||||||
# - k20x7 for Teensy 3.1 and 3.2
|
|
||||||
MCU_STARTUP = k20x7
|
|
||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||||
# or <this_dir>/boards
|
# or <this_dir>/boards
|
||||||
# - BOARD =
|
# - BOARD =
|
||||||
@@ -40,20 +22,6 @@ MCU_STARTUP = k20x7
|
|||||||
# - MCHCK_K20 for Infinity KB
|
# - MCHCK_K20 for Infinity KB
|
||||||
BOARD = IC_TEENSY_3_1
|
BOARD = IC_TEENSY_3_1
|
||||||
|
|
||||||
# Cortex version
|
|
||||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
|
||||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
|
||||||
ARMV = 7
|
|
||||||
|
|
||||||
# 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=0x00001000
|
|
||||||
OPT_DEFS =
|
|
||||||
|
|
||||||
DFU_ARGS = -d 1c11:b007
|
DFU_ARGS = -d 1c11:b007
|
||||||
DFU_SUFFIX_ARGS = -p b007 -v 1c11
|
DFU_SUFFIX_ARGS = -p b007 -v 1c11
|
||||||
|
|
||||||
@@ -75,6 +43,10 @@ BACKLIGHT_ENABLE = yes
|
|||||||
BACKLIGHT_DRIVER = custom
|
BACKLIGHT_DRIVER = custom
|
||||||
VISUALIZER_ENABLE = yes
|
VISUALIZER_ENABLE = yes
|
||||||
|
|
||||||
|
# project specific files
|
||||||
|
SRC = matrix.c \
|
||||||
|
led.c
|
||||||
|
|
||||||
LED_DRIVER = is31fl3731c
|
LED_DRIVER = is31fl3731c
|
||||||
LED_WIDTH = 16
|
LED_WIDTH = 16
|
||||||
LED_HEIGHT = 5
|
LED_HEIGHT = 5
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
"""Format C code according to QMK's style.
|
"""Format C code according to QMK's style.
|
||||||
"""
|
"""
|
||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from shutil import which
|
from shutil import which
|
||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
import qmk.path
|
||||||
|
|
||||||
|
|
||||||
@cli.argument('files', nargs='*', arg_only=True, help='Filename(s) to format.')
|
def cformat_run(files, all_files):
|
||||||
@cli.subcommand("Format C code according to QMK's style.")
|
"""Spawn clang-format subprocess with proper arguments
|
||||||
def cformat(cli):
|
|
||||||
"""Format C code according to QMK's style.
|
|
||||||
"""
|
"""
|
||||||
# Determine which version of clang-format to use
|
# Determine which version of clang-format to use
|
||||||
clang_format = ['clang-format', '-i']
|
clang_format = ['clang-format', '-i']
|
||||||
@@ -19,27 +17,48 @@ def cformat(cli):
|
|||||||
if which(binary):
|
if which(binary):
|
||||||
clang_format[0] = binary
|
clang_format[0] = binary
|
||||||
break
|
break
|
||||||
|
|
||||||
# Find the list of files to format
|
|
||||||
if cli.args.files:
|
|
||||||
cli.args.files = [os.path.join(os.environ['ORIG_CWD'], file) for file in cli.args.files]
|
|
||||||
else:
|
|
||||||
ignores = ['tmk_core/protocol/usb_hid', 'quantum/template']
|
|
||||||
for dir in ['drivers', 'quantum', 'tests', 'tmk_core']:
|
|
||||||
for dirpath, dirnames, filenames in os.walk(dir):
|
|
||||||
if any(i in dirpath for i in ignores):
|
|
||||||
dirnames.clear()
|
|
||||||
continue
|
|
||||||
|
|
||||||
for name in filenames:
|
|
||||||
if name.endswith(('.c', '.h', '.cpp')):
|
|
||||||
cli.args.files.append(os.path.join(dirpath, name))
|
|
||||||
|
|
||||||
# Run clang-format on the files we've found
|
|
||||||
try:
|
try:
|
||||||
subprocess.run(clang_format + cli.args.files, check=True)
|
if not files:
|
||||||
|
cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files')
|
||||||
|
return False
|
||||||
|
if files and all_files:
|
||||||
|
cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(cli.args.files))
|
||||||
|
# 3.6+: Can remove the str casting, python will cast implicitly
|
||||||
|
subprocess.run(clang_format + [str(file) for file in files], check=True)
|
||||||
cli.log.info('Successfully formatted the C code.')
|
cli.log.info('Successfully formatted the C code.')
|
||||||
|
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
cli.log.error('Error formatting C code!')
|
cli.log.error('Error formatting C code!')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('-a', '--all-files', arg_only=True, action='store_true', help='Format all core files.')
|
||||||
|
@cli.argument('-b', '--base-branch', default='origin/master', help='Branch to compare to diffs to.')
|
||||||
|
@cli.argument('files', nargs='*', arg_only=True, help='Filename(s) to format.')
|
||||||
|
@cli.subcommand("Format C code according to QMK's style.")
|
||||||
|
def cformat(cli):
|
||||||
|
"""Format C code according to QMK's style.
|
||||||
|
"""
|
||||||
|
# Empty array for files
|
||||||
|
files = []
|
||||||
|
# Core directories for formatting
|
||||||
|
core_dirs = ['drivers', 'quantum', 'tests', 'tmk_core']
|
||||||
|
ignores = ['tmk_core/protocol/usb_hid', 'quantum/template']
|
||||||
|
# Find the list of files to format
|
||||||
|
if cli.args.files:
|
||||||
|
files.extend(qmk.path.normpath(file) for file in cli.args.files)
|
||||||
|
# If -a is specified
|
||||||
|
elif cli.args.all_files:
|
||||||
|
all_files = qmk.path.c_source_files(core_dirs)
|
||||||
|
# The following statement checks each file to see if the file path is in the ignored directories.
|
||||||
|
files.extend(file for file in all_files if not any(i in str(file) for i in ignores))
|
||||||
|
# No files specified & no -a flag
|
||||||
|
else:
|
||||||
|
base_args = ['git', 'diff', '--name-only', cli.args.base_branch]
|
||||||
|
out = subprocess.run(base_args + core_dirs, check=True, stdout=subprocess.PIPE)
|
||||||
|
changed_files = filter(None, out.stdout.decode('UTF-8').split('\n'))
|
||||||
|
filtered_files = [qmk.path.normpath(file) for file in changed_files if not any(i in file for i in ignores)]
|
||||||
|
files.extend(file for file in filtered_files if file.exists() and file.suffix in ['.c', '.h', '.cpp'])
|
||||||
|
|
||||||
|
# Run clang-format on the files we've found
|
||||||
|
cformat_run(files, cli.args.all_files)
|
||||||
|
|||||||
@@ -68,3 +68,17 @@ def normpath(path):
|
|||||||
return Path(path)
|
return Path(path)
|
||||||
|
|
||||||
return Path(os.environ['ORIG_CWD']) / path
|
return Path(os.environ['ORIG_CWD']) / path
|
||||||
|
|
||||||
|
|
||||||
|
def c_source_files(dir_names):
|
||||||
|
"""Returns a list of all *.c, *.h, and *.cpp files for a given list of directories
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
dir_names
|
||||||
|
List of directories, relative pathing starts at qmk's cwd
|
||||||
|
"""
|
||||||
|
files = []
|
||||||
|
for dir in dir_names:
|
||||||
|
files.extend(file for file in Path(dir).glob('**/*') if file.suffix in ['.c', '.h', '.cpp'])
|
||||||
|
return files
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ def check_subcommand(command, *args):
|
|||||||
|
|
||||||
|
|
||||||
def test_cformat():
|
def test_cformat():
|
||||||
assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0
|
result = check_subcommand('cformat', 'quantum/matrix.c')
|
||||||
|
assert result.returncode == 0
|
||||||
|
|
||||||
|
|
||||||
def test_compile():
|
def test_compile():
|
||||||
|
|||||||
@@ -0,0 +1,153 @@
|
|||||||
|
/* 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 "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ½ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Æ │ Ø │ ' │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define DK_HALF KC_GRV // ½
|
||||||
|
#define DK_1 KC_1 // 1
|
||||||
|
#define DK_2 KC_2 // 2
|
||||||
|
#define DK_3 KC_3 // 3
|
||||||
|
#define DK_4 KC_4 // 4
|
||||||
|
#define DK_5 KC_5 // 5
|
||||||
|
#define DK_6 KC_6 // 6
|
||||||
|
#define DK_7 KC_7 // 7
|
||||||
|
#define DK_8 KC_8 // 8
|
||||||
|
#define DK_9 KC_9 // 9
|
||||||
|
#define DK_0 KC_0 // 0
|
||||||
|
#define DK_PLUS KC_MINS // +
|
||||||
|
#define DK_ACUT KC_EQL // ´ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define DK_Q KC_Q // Q
|
||||||
|
#define DK_W KC_W // W
|
||||||
|
#define DK_E KC_E // E
|
||||||
|
#define DK_R KC_R // R
|
||||||
|
#define DK_T KC_T // T
|
||||||
|
#define DK_Y KC_Y // Y
|
||||||
|
#define DK_U KC_U // U
|
||||||
|
#define DK_I KC_I // I
|
||||||
|
#define DK_O KC_O // O
|
||||||
|
#define DK_P KC_P // P
|
||||||
|
#define DK_ARNG KC_LBRC // Å
|
||||||
|
#define DK_DIAE KC_RBRC // ¨ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define DK_A KC_A // A
|
||||||
|
#define DK_S KC_S // S
|
||||||
|
#define DK_D KC_D // D
|
||||||
|
#define DK_F KC_F // F
|
||||||
|
#define DK_G KC_G // G
|
||||||
|
#define DK_H KC_H // H
|
||||||
|
#define DK_J KC_J // J
|
||||||
|
#define DK_K KC_K // K
|
||||||
|
#define DK_L KC_L // L
|
||||||
|
#define DK_AE KC_SCLN // Æ
|
||||||
|
#define DK_OSTR KC_QUOT // Ø
|
||||||
|
#define DK_QUOT KC_NUHS // '
|
||||||
|
// Row 4
|
||||||
|
#define DK_LABK KC_NUBS // <
|
||||||
|
#define DK_Z KC_Z // Z
|
||||||
|
#define DK_X KC_X // X
|
||||||
|
#define DK_C KC_C // C
|
||||||
|
#define DK_V KC_V // V
|
||||||
|
#define DK_B KC_B // B
|
||||||
|
#define DK_N KC_N // N
|
||||||
|
#define DK_M KC_M // M
|
||||||
|
#define DK_COMM KC_COMM // ,
|
||||||
|
#define DK_DOT KC_DOT // .
|
||||||
|
#define DK_MINS KC_SLSH // -
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ § │ ! │ " │ # │ ¤ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ ^ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ * │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define DK_SECT S(DK_HALF) // §
|
||||||
|
#define DK_EXLM S(DK_1) // !
|
||||||
|
#define DK_DQUO S(DK_2) // "
|
||||||
|
#define DK_HASH S(DK_3) // #
|
||||||
|
#define DK_CURR S(DK_4) // ¤
|
||||||
|
#define DK_PERC S(DK_5) // %
|
||||||
|
#define DK_AMPR S(DK_6) // &
|
||||||
|
#define DK_SLSH S(DK_7) // /
|
||||||
|
#define DK_LPRN S(DK_8) // (
|
||||||
|
#define DK_RPRN S(DK_9) // )
|
||||||
|
#define DK_EQL S(DK_0) // =
|
||||||
|
#define DK_QUES S(DK_PLUS) // ?
|
||||||
|
#define DK_GRV S(DK_ACUT) // ` (dead)
|
||||||
|
// Row 2
|
||||||
|
#define DK_CIRC S(DK_DIAE) // ^ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define DK_ASTR S(DK_QUOT) // *
|
||||||
|
// Row 4
|
||||||
|
#define DK_RABK S(DK_LABK) // >
|
||||||
|
#define DK_SCLN S(DK_COMM) // ;
|
||||||
|
#define DK_COLN S(DK_DOT) // :
|
||||||
|
#define DK_UNDS S(DK_MINS) // _
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ │ @ │ £ │ $ │ € │ │ { │ [ │ ] │ } │ │ | │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ \ │ │ │ │ │ │ │ µ │ │ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define DK_AT ALGR(DK_2) // @
|
||||||
|
#define DK_PND ALGR(DK_3) // £
|
||||||
|
#define DK_DLR ALGR(DK_4) // $
|
||||||
|
#define DK_EURO ALGR(DK_5) // €
|
||||||
|
#define DK_LCBR ALGR(DK_7) // {
|
||||||
|
#define DK_LBRC ALGR(DK_8) // [
|
||||||
|
#define DK_RBRC ALGR(DK_9) // ]
|
||||||
|
#define DK_RCBR ALGR(DK_0) // }
|
||||||
|
#define DK_PIPE ALGR(DK_ACUT) // |
|
||||||
|
// Row 2
|
||||||
|
#define DK_TILD ALGR(DK_DIAE) // ~ (dead)
|
||||||
|
// Row 4
|
||||||
|
#define DK_BSLS ALGR(DK_LABK) // (backslash)
|
||||||
|
#define DK_MICR ALGR(DK_M) // µ
|
||||||
@@ -0,0 +1,197 @@
|
|||||||
|
/* 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 "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ + │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ / │ - │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ F │ G │ Ğ │ I │ O │ D │ R │ N │ H │ P │ Q │ W │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ U │ İ │ E │ A │ Ü │ T │ K │ M │ L │ Y │ Ş │ X │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ < │ J │ Ö │ V │ C │ Ç │ Z │ S │ B │ . │ , │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_PLUS KC_GRV // +
|
||||||
|
#define TR_1 KC_1 // 1
|
||||||
|
#define TR_2 KC_2 // 2
|
||||||
|
#define TR_3 KC_3 // 3
|
||||||
|
#define TR_4 KC_4 // 4
|
||||||
|
#define TR_5 KC_5 // 5
|
||||||
|
#define TR_6 KC_6 // 6
|
||||||
|
#define TR_7 KC_7 // 7
|
||||||
|
#define TR_8 KC_8 // 8
|
||||||
|
#define TR_9 KC_9 // 9
|
||||||
|
#define TR_0 KC_0 // 0
|
||||||
|
#define TR_SLSH KC_MINS // /
|
||||||
|
#define TR_MINS KC_EQL // -
|
||||||
|
// Row 2
|
||||||
|
#define TR_F KC_Q // F
|
||||||
|
#define TR_G KC_W // G
|
||||||
|
#define TR_GBRV KC_E // Ğ
|
||||||
|
#define TR_I KC_R // I
|
||||||
|
#define TR_O KC_T // O
|
||||||
|
#define TR_D KC_Y // D
|
||||||
|
#define TR_R KC_U // R
|
||||||
|
#define TR_N KC_I // N
|
||||||
|
#define TR_H KC_O // H
|
||||||
|
#define TR_P KC_P // P
|
||||||
|
#define TR_Q KC_LBRC // Q
|
||||||
|
#define TR_W KC_RBRC // W
|
||||||
|
// Row 3
|
||||||
|
#define TR_U KC_A // U
|
||||||
|
#define TR_IDOT KC_S // İ
|
||||||
|
#define TR_E KC_D // E
|
||||||
|
#define TR_A KC_F // A
|
||||||
|
#define TR_UDIA KC_G // Ü
|
||||||
|
#define TR_T KC_H // T
|
||||||
|
#define TR_K KC_J // K
|
||||||
|
#define TR_M KC_K // M
|
||||||
|
#define TR_L KC_L // L
|
||||||
|
#define TR_Y KC_SCLN // Y
|
||||||
|
#define TR_SCED KC_QUOT // Ş
|
||||||
|
#define TR_X KC_NUHS // X
|
||||||
|
// Row 4
|
||||||
|
#define TR_LABK KC_NUBS // <
|
||||||
|
#define TR_J KC_Z // J
|
||||||
|
#define TR_ODIA KC_X // Ö
|
||||||
|
#define TR_V KC_C // V
|
||||||
|
#define TR_C KC_V // C
|
||||||
|
#define TR_CCED KC_B // Ç
|
||||||
|
#define TR_Z KC_N // Z
|
||||||
|
#define TR_S KC_M // S
|
||||||
|
#define TR_B KC_COMM // B
|
||||||
|
#define TR_DOT KC_DOT // .
|
||||||
|
#define TR_COMM KC_SLSH // ,
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ * │ ! │ " │ ^ │ $ │ % │ & │ ' │ ( │ ) │ = │ ? │ _ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ > │ │ │ │ │ │ │ │ │ : │ ; │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_ASTR S(TR_PLUS) // *
|
||||||
|
#define TR_EXLM S(TR_1) // !
|
||||||
|
#define TR_DQUO S(TR_2) // "
|
||||||
|
#define TR_CIRC S(TR_3) // ^ (dead)
|
||||||
|
#define TR_DLR S(TR_4) // $
|
||||||
|
#define TR_PERC S(TR_5) // %
|
||||||
|
#define TR_AMPR S(TR_6) // &
|
||||||
|
#define TR_QUOT S(TR_7) // '
|
||||||
|
#define TR_LPRN S(TR_8) // (
|
||||||
|
#define TR_RPRN S(TR_9) // )
|
||||||
|
#define TR_EQL S(TR_0) // =
|
||||||
|
#define TR_QUES S(TR_ASTR) // ?
|
||||||
|
#define TR_UNDS S(TR_MINS) // _
|
||||||
|
// Row 4
|
||||||
|
#define TR_RABK S(TR_LABK) // >
|
||||||
|
#define TR_COLN S(TR_DOT) // :
|
||||||
|
#define TR_SCLN S(TR_COMM) // ;
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ¬ │ ¹ │ ² │ # │ ¼ │ ½ │ ¾ │ { │ [ │ ] │ } │ \ │ | │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ @ │ │ │ ¶ │ │ ¥ │ │ │ Ø │ £ │ ¨ │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ Æ │ ß │ € │ │ │ ₺ │ │ │ │ ´ │ │ ` │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ │ « │ » │ ¢ │ │ │ │ µ │ × │ ÷ │ - │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_NOT ALGR(TR_PLUS) // ¬
|
||||||
|
#define TR_SUP1 ALGR(TR_1) // ¹
|
||||||
|
#define TR_SUP2 ALGR(TR_2) // ²
|
||||||
|
#define TR_HASH ALGR(TR_3) // #
|
||||||
|
#define TR_QRTR ALGR(TR_4) // ¼
|
||||||
|
#define TR_HALF ALGR(TR_5) // ½
|
||||||
|
#define TR_TQTR ALGR(TR_6) // ¾
|
||||||
|
#define TR_LCBR ALGR(TR_7) // {
|
||||||
|
#define TR_LBRC ALGR(TR_8) // [
|
||||||
|
#define TR_RBRC ALGR(TR_9) // ]
|
||||||
|
#define TR_RCBR ALGR(TR_0) // }
|
||||||
|
#define TR_BSLS ALGR(TR_SLSH) // (backslash)
|
||||||
|
#define TR_PIPE ALGR(TR_MINS) // |
|
||||||
|
// Row 2
|
||||||
|
#define TR_AT ALGR(TR_F) // @
|
||||||
|
#define TR_PILC ALGR(TR_I) // ¶
|
||||||
|
#define TR_YEN ALGR(TR_D) // ¥
|
||||||
|
#define TR_OSTR ALGR(TR_H) // Ø
|
||||||
|
#define TR_PND ALGR(TR_P) // £
|
||||||
|
#define TR_DIAE ALGR(TR_Q) // ¨ (dead)
|
||||||
|
#define TR_TILD ALGR(TR_W) // ~ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define TR_AE ALGR(TR_U) // Æ
|
||||||
|
#define TR_SS ALGR(TR_IDOT) // ß
|
||||||
|
#define TR_EURO ALGR(TR_E) // €
|
||||||
|
#define TR_LIRA ALGR(TR_T) // ₺
|
||||||
|
#define TR_ACUT ALGR(TR_Y) // ´ (dead)
|
||||||
|
#define TR_GRV ALGR(TR_X) // ` (dead)
|
||||||
|
// Row 4
|
||||||
|
#define TR_LDAQ ALGR(TR_J) // «
|
||||||
|
#define TR_RDAQ ALGR(TR_ODIA) // »
|
||||||
|
#define TR_CENT ALGR(TR_V) // ¢
|
||||||
|
#define TR_MICR ALGR(TR_S) // µ
|
||||||
|
#define TR_MUL ALGR(TR_B) // ×
|
||||||
|
#define TR_DIV ALGR(TR_DOT) // ÷
|
||||||
|
#define TR_SHYP ALGR(TR_COMM) // (soft hyphen)
|
||||||
|
|
||||||
|
/* Shift+AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ │ │ ³ │ ¤ │ │ │ │ │ │ │ ¿ │ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ ® │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ § │ │ ª │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ ¦ │ │ │ © │ │ │ │ º │ │ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_SUP3 S(ALGR(TR_3)) // ³
|
||||||
|
#define TR_CURR S(ALGR(TR_4)) // ¤
|
||||||
|
#define TR_IQUE S(ALGR(TR_SLSH)) // ¿
|
||||||
|
// Row 2
|
||||||
|
#define TR_REGD S(ALGR(TR_I) // ®
|
||||||
|
// Row 3
|
||||||
|
#define TR_SECT S(ALGR(TR_IDOT)) // §
|
||||||
|
#define TR_FORD S(ALGR(TR_A)) // ª
|
||||||
|
// Row 4
|
||||||
|
#define TR_BRKP S(ALGR(TR_LABK)) // ¦
|
||||||
|
#define TR_COPY S(ALGR(TR_V)) // ©
|
||||||
|
#define TR_MORD S(ALGR(TR_S)) // º
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
/* 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 "keymap.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ " │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ * │ - │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Ğ │ Ü │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ş │ İ │ , │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ Ö │ Ç │ . │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_DQUO KC_GRV // "
|
||||||
|
#define TR_1 KC_1 // 1
|
||||||
|
#define TR_2 KC_2 // 2
|
||||||
|
#define TR_3 KC_3 // 3
|
||||||
|
#define TR_4 KC_4 // 4
|
||||||
|
#define TR_5 KC_5 // 5
|
||||||
|
#define TR_6 KC_6 // 6
|
||||||
|
#define TR_7 KC_7 // 7
|
||||||
|
#define TR_8 KC_8 // 8
|
||||||
|
#define TR_9 KC_9 // 9
|
||||||
|
#define TR_0 KC_0 // 0
|
||||||
|
#define TR_ASTR KC_MINS // *
|
||||||
|
#define TR_MINS KC_EQL // -
|
||||||
|
// Row 2
|
||||||
|
#define TR_Q KC_Q // Q
|
||||||
|
#define TR_W KC_W // W
|
||||||
|
#define TR_E KC_E // E
|
||||||
|
#define TR_R KC_R // R
|
||||||
|
#define TR_T KC_T // T
|
||||||
|
#define TR_Y KC_Y // Y
|
||||||
|
#define TR_U KC_U // U
|
||||||
|
#define TR_I KC_I // I
|
||||||
|
#define TR_O KC_O // O
|
||||||
|
#define TR_P KC_P // P
|
||||||
|
#define TR_GBRV KC_LBRC // Ğ
|
||||||
|
#define TR_UDIA KC_RBRC // Ü
|
||||||
|
// Row 3
|
||||||
|
#define TR_A KC_A // A
|
||||||
|
#define TR_S KC_S // S
|
||||||
|
#define TR_D KC_D // D
|
||||||
|
#define TR_F KC_F // F
|
||||||
|
#define TR_G KC_G // G
|
||||||
|
#define TR_H KC_H // H
|
||||||
|
#define TR_J KC_J // J
|
||||||
|
#define TR_K KC_K // K
|
||||||
|
#define TR_L KC_L // L
|
||||||
|
#define TR_SCED KC_SCLN // Ş
|
||||||
|
#define TR_IDOT KC_QUOT // İ
|
||||||
|
#define TR_COMM KC_NUHS // ,
|
||||||
|
// Row 4
|
||||||
|
#define TR_LABK KC_NUBS // <
|
||||||
|
#define TR_Z KC_Z // Z
|
||||||
|
#define TR_X KC_X // X
|
||||||
|
#define TR_C KC_C // C
|
||||||
|
#define TR_V KC_V // V
|
||||||
|
#define TR_B KC_B // B
|
||||||
|
#define TR_N KC_N // N
|
||||||
|
#define TR_M KC_M // M
|
||||||
|
#define TR_ODIA KC_COMM // Ö
|
||||||
|
#define TR_CCED KC_DOT // Ç
|
||||||
|
#define TR_DOT KC_SLSH // .
|
||||||
|
|
||||||
|
/* Shifted symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ é │ ! │ ' │ ^ │ + │ % │ & │ / │ ( │ ) │ = │ ? │ _ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ ; │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ > │ │ │ │ │ │ │ │ │ │ : │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_EACU S(TR_DQUO) // é
|
||||||
|
#define TR_EXLM S(TR_1) // !
|
||||||
|
#define TR_QUOT S(TR_2) // '
|
||||||
|
#define TR_CIRC S(TR_3) // ^ (dead)
|
||||||
|
#define TR_PLUS S(TR_4) // +
|
||||||
|
#define TR_PERC S(TR_5) // %
|
||||||
|
#define TR_AMPR S(TR_6) // &
|
||||||
|
#define TR_SLSH S(TR_7) // /
|
||||||
|
#define TR_LPRN S(TR_8) // (
|
||||||
|
#define TR_RPRN S(TR_9) // )
|
||||||
|
#define TR_EQL S(TR_0) // =
|
||||||
|
#define TR_QUES S(TR_ASTR) // ?
|
||||||
|
#define TR_UNDS S(TR_MINS) // _
|
||||||
|
// Row 3
|
||||||
|
#define TR_SCLN S(TR_COMM) // ;
|
||||||
|
// Row 4
|
||||||
|
#define TR_RABK S(TR_LABK) // >
|
||||||
|
#define TR_COLN S(TR_DOT) // :
|
||||||
|
|
||||||
|
/* AltGr symbols
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ │ │ £ │ # │ $ │ ½ │ │ { │ [ │ ] │ } │ \ │ | │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ @ │ │ € │ │ ₺ │ │ │ │ │ │ ¨ │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ Æ │ ß │ │ │ │ │ │ │ │ ´ │ │ ` │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define TR_PND ALGR(TR_2) // £
|
||||||
|
#define TR_HASH ALGR(TR_3) // #
|
||||||
|
#define TR_DLR ALGR(TR_4) // $
|
||||||
|
#define TR_HALF ALGR(TR_5) // ½
|
||||||
|
#define TR_LCBR ALGR(TR_7) // {
|
||||||
|
#define TR_LBRC ALGR(TR_8) // [
|
||||||
|
#define TR_RBRC ALGR(TR_9) // ]
|
||||||
|
#define TR_RCBR ALGR(TR_0) // }
|
||||||
|
#define TR_BSLS ALGR(TR_ASTR) // (backslash)
|
||||||
|
#define TR_PIPE ALGR(TR_MINS) // |
|
||||||
|
// Row 2
|
||||||
|
#define TR_AT ALGR(TR_Q) // @
|
||||||
|
#define TR_EURO ALGR(TR_E) // €
|
||||||
|
#define TR_LIRA ALGR(TR_T) // ₺
|
||||||
|
#define TR_DIAE ALGR(TR_GBRV) // ¨ (dead)
|
||||||
|
#define TR_TILD ALGR(TR_UDIA) // ~ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define TR_AE ALGR(TR_A) // Æ
|
||||||
|
#define TR_SS ALGR(TR_S) // ß
|
||||||
|
#define TR_ACUT ALGR(TR_SCED) // ´ (dead)
|
||||||
|
#define TR_GRV ALGR(TR_COMM) // ` (dead)
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Danish layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_danish.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
|
0, 1, 1, 1, 0, 1, 1, 0,
|
||||||
|
1, 1, 1, 0, 0, 0, 0, 1,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 1, 1, 0, 1, 1, 1,
|
||||||
|
0, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 0, 0, 0, 1, 1,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
|
0, 0, 0, 0, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 1, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, DK_1, DK_2, DK_3, DK_4, DK_5, DK_6, DK_QUOT,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
DK_8, DK_9, DK_QUOT, DK_PLUS, DK_COMM, DK_MINS, DK_DOT, DK_7,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
DK_0, DK_1, DK_2, DK_3, DK_4, DK_5, DK_6, DK_7,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
DK_8, DK_9, DK_DOT, DK_COMM, DK_LABK, DK_0, DK_LABK, DK_PLUS,
|
||||||
|
// @ A B C D E F G
|
||||||
|
DK_2, DK_A, DK_B, DK_C, DK_D, DK_E, DK_F, DK_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
DK_H, DK_I, DK_J, DK_K, DK_L, DK_M, DK_N, DK_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
DK_P, DK_Q, DK_R, DK_S, DK_T, DK_U, DK_V, DK_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
DK_X, DK_Y, DK_Z, DK_8, DK_LABK, DK_9, DK_DIAE, DK_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
DK_ACUT, DK_A, DK_B, DK_C, DK_D, DK_E, DK_F, DK_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
DK_H, DK_I, DK_J, DK_K, DK_L, DK_M, DK_N, DK_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
DK_P, DK_Q, DK_R, DK_S, DK_T, DK_U, DK_V, DK_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
DK_X, DK_Y, DK_Z, DK_7, DK_ACUT, DK_0, DK_DIAE, KC_DEL
|
||||||
|
};
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Turkish F layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_turkish_f.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
|
0, 1, 1, 0, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 1, 1, 0, 1, 1, 1,
|
||||||
|
0, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 0, 0, 0, 1, 1,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
|
0, 0, 0, 1, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 0, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 1, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
TR_8, TR_9, TR_PLUS, TR_PLUS, TR_COMM, TR_MINS, TR_DOT, TR_SLSH,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
TR_0, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
TR_8, TR_9, TR_DOT, TR_COMM, TR_LABK, TR_0, TR_LABK, TR_SLSH,
|
||||||
|
// @ A B C D E F G
|
||||||
|
TR_F, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
TR_X, TR_Y, TR_Z, TR_8, TR_SLSH, TR_9, TR_3, TR_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
TR_X, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
TR_X, TR_Y, TR_Z, TR_7, TR_MINS, TR_0, TR_W, KC_DEL
|
||||||
|
};
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Turkish Q layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_turkish_q.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const bool ascii_to_shift_lut[128] PROGMEM = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
|
0, 1, 0, 0, 0, 1, 1, 1,
|
||||||
|
1, 1, 0, 1, 0, 0, 0, 1,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 1, 1, 0, 1, 1, 1,
|
||||||
|
0, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 0, 0, 0, 1, 1,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const bool ascii_to_altgr_lut[128] PROGMEM = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
|
0, 0, 0, 1, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 0, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 1, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, TR_1, TR_DQUO, TR_3, TR_4, TR_5, TR_6, TR_2,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
TR_8, TR_9, TR_ASTR, TR_4, TR_COMM, TR_MINS, TR_DOT, TR_7,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
TR_0, TR_1, TR_2, TR_3, TR_4, TR_5, TR_6, TR_7,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
TR_8, TR_9, TR_DOT, TR_COMM, TR_LABK, TR_0, TR_LABK, TR_ASTR,
|
||||||
|
// @ A B C D E F G
|
||||||
|
TR_Q, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
TR_X, TR_Y, TR_Z, TR_8, TR_ASTR, TR_9, TR_3, TR_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
TR_COMM, TR_A, TR_B, TR_C, TR_D, TR_E, TR_F, TR_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
TR_H, TR_I, TR_J, TR_K, TR_L, TR_M, TR_N, TR_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
TR_P, TR_Q, TR_R, TR_S, TR_T, TR_U, TR_V, TR_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
TR_X, TR_Y, TR_Z, TR_7, TR_MINS, TR_0, TR_UDIA, KC_DEL
|
||||||
|
};
|
||||||
@@ -1,3 +1,85 @@
|
|||||||
|
ifneq ($(findstring MKL26Z64, $(MCU)),)
|
||||||
|
# Cortex version
|
||||||
|
MCU = cortex-m0plus
|
||||||
|
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 6
|
||||||
|
|
||||||
|
## chip/board settings
|
||||||
|
# - the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = KINETIS
|
||||||
|
MCU_SERIES = KL2x
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <keyboard_dir>/ld/
|
||||||
|
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
||||||
|
MCU_LDSCRIPT ?= MKL26Z64
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP ?= kl2x
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/,
|
||||||
|
# <keyboard_dir>/boards/, or drivers/boards/
|
||||||
|
BOARD ?= PJRC_TEENSY_LC
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring MK20DX128, $(MCU)),)
|
||||||
|
# Cortex version
|
||||||
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 7
|
||||||
|
|
||||||
|
## chip/board settings
|
||||||
|
# - the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = KINETIS
|
||||||
|
MCU_SERIES = K20x
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <keyboard_dir>/ld/
|
||||||
|
MCU_LDSCRIPT ?= MK20DX128
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP ?= k20x5
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/,
|
||||||
|
# <keyboard_dir>/boards/, or drivers/boards/
|
||||||
|
BOARD ?= PJRC_TEENSY_3
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring MK20DX256, $(MCU)),)
|
||||||
|
# Cortex version
|
||||||
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 7
|
||||||
|
|
||||||
|
## chip/board settings
|
||||||
|
# - the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = KINETIS
|
||||||
|
MCU_SERIES = K20x
|
||||||
|
|
||||||
|
# Linker script to use
|
||||||
|
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <keyboard_dir>/ld/
|
||||||
|
MCU_LDSCRIPT ?= MK20DX256
|
||||||
|
|
||||||
|
# Startup code to use
|
||||||
|
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP ?= k20x7
|
||||||
|
|
||||||
|
# Board: it should exist either in <chibios>/os/hal/boards/,
|
||||||
|
# <keyboard_dir>/boards/, or drivers/boards/
|
||||||
|
BOARD ?= PJRC_TEENSY_3_1
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring STM32F303, $(MCU)),)
|
ifneq ($(findstring STM32F303, $(MCU)),)
|
||||||
# Cortex version
|
# Cortex version
|
||||||
MCU = cortex-m4
|
MCU = cortex-m4
|
||||||
|
|||||||
@@ -137,6 +137,24 @@
|
|||||||
#define X_BRMU X_PAUSE
|
#define X_BRMU X_PAUSE
|
||||||
#define X_BRMD X_SCROLLLOCK
|
#define X_BRMD X_SCROLLLOCK
|
||||||
|
|
||||||
|
/* Mouse Keys */
|
||||||
|
#define X_MS_U X_MS_UP
|
||||||
|
#define X_MS_D X_MS_DOWN
|
||||||
|
#define X_MS_L X_MS_LEFT
|
||||||
|
#define X_MS_R X_MS_RIGHT
|
||||||
|
#define X_BTN1 X_MS_BTN1
|
||||||
|
#define X_BTN2 X_MS_BTN2
|
||||||
|
#define X_BTN3 X_MS_BTN3
|
||||||
|
#define X_BTN4 X_MS_BTN4
|
||||||
|
#define X_BTN5 X_MS_BTN5
|
||||||
|
#define X_WH_U X_MS_WH_UP
|
||||||
|
#define X_WH_D X_MS_WH_DOWN
|
||||||
|
#define X_WH_L X_MS_WH_LEFT
|
||||||
|
#define X_WH_R X_MS_WH_RIGHT
|
||||||
|
#define X_ACL0 X_MS_ACCEL0
|
||||||
|
#define X_ACL1 X_MS_ACCEL1
|
||||||
|
#define X_ACL2 X_MS_ACCEL2
|
||||||
|
|
||||||
/* Keyboard/Keypad Page (0x07) */
|
/* Keyboard/Keypad Page (0x07) */
|
||||||
#define X_A 04
|
#define X_A 04
|
||||||
#define X_B 05
|
#define X_B 05
|
||||||
@@ -341,6 +359,24 @@
|
|||||||
#define X_BRIGHTNESS_UP bd
|
#define X_BRIGHTNESS_UP bd
|
||||||
#define X_BRIGHTNESS_DOWN be
|
#define X_BRIGHTNESS_DOWN be
|
||||||
|
|
||||||
|
/* Mouse Buttons (unallocated range in HID spec) */
|
||||||
|
#define X_MS_UP f0
|
||||||
|
#define X_MS_DOWN f1
|
||||||
|
#define X_MS_LEFT f2
|
||||||
|
#define X_MS_RIGHT f3
|
||||||
|
#define X_MS_BTN1 f4
|
||||||
|
#define X_MS_BTN2 f5
|
||||||
|
#define X_MS_BTN3 f6
|
||||||
|
#define X_MS_BTN4 f7
|
||||||
|
#define X_MS_BTN5 f8
|
||||||
|
#define X_MS_WH_UP f9
|
||||||
|
#define X_MS_WH_DOWN fa
|
||||||
|
#define X_MS_WH_LEFT fb
|
||||||
|
#define X_MS_WH_RIGHT fc
|
||||||
|
#define X_MS_ACCEL0 fd
|
||||||
|
#define X_MS_ACCEL1 fe
|
||||||
|
#define X_MS_ACCEL2 ff
|
||||||
|
|
||||||
// Send string macros
|
// Send string macros
|
||||||
#define STRINGIZE(z) #z
|
#define STRINGIZE(z) #z
|
||||||
#define ADD_SLASH_X(y) STRINGIZE(\x##y)
|
#define ADD_SLASH_X(y) STRINGIZE(\x##y)
|
||||||
|
|||||||
+44
-10
@@ -31,9 +31,41 @@
|
|||||||
|
|
||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
|
|
||||||
|
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
|
||||||
|
# define UDRn UDR0
|
||||||
|
# define UBRRn UBRR0
|
||||||
|
# define UCSRnA UCSR0A
|
||||||
|
# define UCSRnB UCSR0B
|
||||||
|
# define UCSRnC UCSR0C
|
||||||
|
# define U2Xn U2X0
|
||||||
|
# define RXENn RXEN0
|
||||||
|
# define TXENn TXEN0
|
||||||
|
# define RXCIEn RXCIE0
|
||||||
|
# define UCSZn1 UCSZ01
|
||||||
|
# define UCSZn0 UCSZ00
|
||||||
|
# define UDRIEn UDRIE0
|
||||||
|
# define UDRE_vect USART_UDRE_vect
|
||||||
|
# define RX_vect USART_RX_vect
|
||||||
|
#elif defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
|
# define UDRn UDR1
|
||||||
|
# define UBRRn UBRR1
|
||||||
|
# define UCSRnA UCSR1A
|
||||||
|
# define UCSRnB UCSR1B
|
||||||
|
# define UCSRnC UCSR1C
|
||||||
|
# define U2Xn U2X1
|
||||||
|
# define RXENn RXEN1
|
||||||
|
# define TXENn TXEN1
|
||||||
|
# define RXCIEn RXCIE1
|
||||||
|
# define UCSZn1 UCSZ11
|
||||||
|
# define UCSZn0 UCSZ10
|
||||||
|
# define UDRIEn UDRIE1
|
||||||
|
# define UDRE_vect USART1_UDRE_vect
|
||||||
|
# define RX_vect USART1_RX_vect
|
||||||
|
#endif
|
||||||
|
|
||||||
// These buffers may be any size from 2 to 256 bytes.
|
// These buffers may be any size from 2 to 256 bytes.
|
||||||
#define RX_BUFFER_SIZE 64
|
#define RX_BUFFER_SIZE 64
|
||||||
#define TX_BUFFER_SIZE 40
|
#define TX_BUFFER_SIZE 256
|
||||||
|
|
||||||
static volatile uint8_t tx_buffer[TX_BUFFER_SIZE];
|
static volatile uint8_t tx_buffer[TX_BUFFER_SIZE];
|
||||||
static volatile uint8_t tx_buffer_head;
|
static volatile uint8_t tx_buffer_head;
|
||||||
@@ -45,10 +77,10 @@ static volatile uint8_t rx_buffer_tail;
|
|||||||
// Initialize the UART
|
// Initialize the UART
|
||||||
void uart_init(uint32_t baud) {
|
void uart_init(uint32_t baud) {
|
||||||
cli();
|
cli();
|
||||||
UBRR0 = (F_CPU / 4 / baud - 1) / 2;
|
UBRRn = (F_CPU / 4 / baud - 1) / 2;
|
||||||
UCSR0A = (1 << U2X0);
|
UCSRnA = (1 << U2Xn);
|
||||||
UCSR0B = (1 << RXEN0) | (1 << TXEN0) | (1 << RXCIE0);
|
UCSRnB = (1 << RXENn) | (1 << TXENn) | (1 << RXCIEn);
|
||||||
UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);
|
UCSRnC = (1 << UCSZn1) | (1 << UCSZn0);
|
||||||
tx_buffer_head = tx_buffer_tail = 0;
|
tx_buffer_head = tx_buffer_tail = 0;
|
||||||
rx_buffer_head = rx_buffer_tail = 0;
|
rx_buffer_head = rx_buffer_tail = 0;
|
||||||
sei();
|
sei();
|
||||||
@@ -60,12 +92,14 @@ void uart_putchar(uint8_t c) {
|
|||||||
|
|
||||||
i = tx_buffer_head + 1;
|
i = tx_buffer_head + 1;
|
||||||
if (i >= TX_BUFFER_SIZE) i = 0;
|
if (i >= TX_BUFFER_SIZE) i = 0;
|
||||||
|
// return immediately to avoid deadlock when interrupt is disabled(called from ISR)
|
||||||
|
if (tx_buffer_tail == i && (SREG & (1 << SREG_I)) == 0) return;
|
||||||
while (tx_buffer_tail == i)
|
while (tx_buffer_tail == i)
|
||||||
; // wait until space in buffer
|
; // wait until space in buffer
|
||||||
// cli();
|
// cli();
|
||||||
tx_buffer[i] = c;
|
tx_buffer[i] = c;
|
||||||
tx_buffer_head = i;
|
tx_buffer_head = i;
|
||||||
UCSR0B = (1 << RXEN0) | (1 << TXEN0) | (1 << RXCIE0) | (1 << UDRIE0);
|
UCSRB = (1 << RXENn) | (1 << TXENn) | (1 << RXCIEn) | (1 << UDRIEn);
|
||||||
// sei();
|
// sei();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,12 +129,12 @@ uint8_t uart_available(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Transmit Interrupt
|
// Transmit Interrupt
|
||||||
ISR(USART_UDRE_vect) {
|
ISR(UDRE_vect) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
if (tx_buffer_head == tx_buffer_tail) {
|
if (tx_buffer_head == tx_buffer_tail) {
|
||||||
// buffer is empty, disable transmit interrupt
|
// buffer is empty, disable transmit interrupt
|
||||||
UCSR0B = (1 << RXEN0) | (1 << TXEN0) | (1 << RXCIE0);
|
UCSRnB = (1 << RXENn) | (1 << TXENn) | (1 << RXCIEn);
|
||||||
} else {
|
} else {
|
||||||
i = tx_buffer_tail + 1;
|
i = tx_buffer_tail + 1;
|
||||||
if (i >= TX_BUFFER_SIZE) i = 0;
|
if (i >= TX_BUFFER_SIZE) i = 0;
|
||||||
@@ -110,10 +144,10 @@ ISR(USART_UDRE_vect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Receive Interrupt
|
// Receive Interrupt
|
||||||
ISR(USART_RX_vect) {
|
ISR(RX_vect) {
|
||||||
uint8_t c, i;
|
uint8_t c, i;
|
||||||
|
|
||||||
c = UDR0;
|
c = UDRn;
|
||||||
i = rx_buffer_head + 1;
|
i = rx_buffer_head + 1;
|
||||||
if (i >= RX_BUFFER_SIZE) i = 0;
|
if (i >= RX_BUFFER_SIZE) i = 0;
|
||||||
if (i != rx_buffer_tail) {
|
if (i != rx_buffer_tail) {
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ int main(void) {
|
|||||||
#endif
|
#endif
|
||||||
keyboard_setup();
|
keyboard_setup();
|
||||||
|
|
||||||
keyboard_init();
|
|
||||||
host_set_driver(vusb_driver());
|
host_set_driver(vusb_driver());
|
||||||
|
|
||||||
debug("initForUsbConnectivity()\n");
|
debug("initForUsbConnectivity()\n");
|
||||||
initForUsbConnectivity();
|
initForUsbConnectivity();
|
||||||
|
|
||||||
|
keyboard_init();
|
||||||
|
|
||||||
debug("main loop\n");
|
debug("main loop\n");
|
||||||
while (1) {
|
while (1) {
|
||||||
#if USB_COUNT_SOF
|
#if USB_COUNT_SOF
|
||||||
|
|||||||
Reference in New Issue
Block a user