forked from mirrors/qmk_firmware
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f86e8ae9a | ||
|
|
e7f6e90a22 | ||
|
|
20290a1cff | ||
|
|
80d329bb55 | ||
|
|
251a69ea3d | ||
|
|
31c0fe69f6 |
@@ -1,36 +1,37 @@
|
||||
# OLED Driver
|
||||
|
||||
## OLED Supported Hardware
|
||||
## Supported Hardware
|
||||
|
||||
OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
|
||||
Tested combinations:
|
||||
|
||||
| IC driver | Size | Keyboard Platform | Notes |
|
||||
|-----------|--------|-------------------|--------------------------|
|
||||
|IC |Size |Platform|Notes |
|
||||
|---------|------|--------|------------------------|
|
||||
|SSD1306 |128x32|AVR |Primary support |
|
||||
|SSD1306 |128x64|AVR |Verified working |
|
||||
| SSD1306 | 128x32 | ARM | |
|
||||
|SSD1306 |128x32|Arm | |
|
||||
|SH1106 |128x64|AVR |No rotation or scrolling|
|
||||
|
||||
Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
|
||||
Hardware configurations using Arm-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
|
||||
|
||||
!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards.
|
||||
!> Warning: This OLED driver currently uses the new i2c_master driver from Split Common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest Split Common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses Split Common to detect keypresses, so you will need to implement custom timeout logic for non-Split Common keyboards.
|
||||
|
||||
## Usage
|
||||
|
||||
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.:
|
||||
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
|
||||
|
||||
```
|
||||
```make
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
```
|
||||
|
||||
This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g:
|
||||
Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
|
||||
|
||||
```C++
|
||||
```c
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
void oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
@@ -47,24 +48,25 @@ void oled_task_user(void) {
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
}
|
||||
#endif
|
||||
```
|
||||
|
||||
## Logo Example
|
||||
|
||||
In the default font, ranges in the font file are reserved for a QMK Logo. To Render this logo to the oled screen, use the following code example:
|
||||
In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the OLED screen, use the following code example:
|
||||
|
||||
```C++
|
||||
```c
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||
};
|
||||
|
||||
oled_write_P(qmk_logo, false);
|
||||
}
|
||||
@@ -72,13 +74,15 @@ static void render_logo(void) {
|
||||
|
||||
## Other Examples
|
||||
|
||||
In split keyboards, it is very common to have two OLED displays that each render different content and oriented flipped differently. You can do this by switching which content to render by using the return from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
|
||||
In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
|
||||
|
||||
```C++
|
||||
```c
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master())
|
||||
if (!is_keyboard_master()) {
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
}
|
||||
|
||||
return rotation;
|
||||
}
|
||||
|
||||
@@ -86,18 +90,17 @@ void oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_logo(); // Renders a statuc logo
|
||||
render_logo(); // Renders a static logo
|
||||
oled_scroll_left(); // Turns on scrolling
|
||||
}
|
||||
}
|
||||
#endif
|
||||
```
|
||||
|
||||
|
||||
## Basic Configuration
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
|
||||
|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
|
||||
|`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
|
||||
@@ -115,16 +118,16 @@ void oled_task_user(void) {
|
||||
The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind. We have added a define, `OLED_DISPLAY_128X64`, to switch all the values to be used in a 128x64 display, as well as added a custom define, `OLED_DISPLAY_CUSTOM`, that allows you to provide the necessary values to the driver.
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------|---------------|-----------------------------------------------------------------|
|
||||
|---------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`OLED_DISPLAY_128X64`|*Not defined* |Changes the display defines for use with 128x64 displays. |
|
||||
|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. |
|
||||
|`OLED_DISPLAY_CUSTOM`|*Not defined* |Changes the display defines for use with custom displays.<br>Requires user to implement the below defines. |
|
||||
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|
||||
|`OLED_DISPLAY_HEIGHT`|`32` |The height of the OLED display. |
|
||||
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|
||||
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|
||||
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
|
||||
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|
||||
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|
||||
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br />Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. |
|
||||
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|
||||
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|
||||
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br>Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`.|
|
||||
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|
||||
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|
||||
|
||||
@@ -133,7 +136,7 @@ void oled_task_user(void) {
|
||||
|
||||
!> Rotation is unsupported on the SH1106.
|
||||
|
||||
```C
|
||||
```c
|
||||
// OLED Rotation enum values are flags
|
||||
typedef enum {
|
||||
OLED_ROTATION_0 = 0,
|
||||
@@ -143,9 +146,9 @@ typedef enum {
|
||||
} oled_rotation_t;
|
||||
```
|
||||
|
||||
OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
|
||||
OLED displays driven by SSD1306 drivers only natively support in hardware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an ATmega32U4 board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
|
||||
|
||||
90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
|
||||
90 degree rotation is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the display height, width, and block size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
|
||||
|
||||
| | | | | | |
|
||||
|---|---|---|---|---|---|
|
||||
@@ -167,8 +170,8 @@ So those precalculated arrays just index the memory offsets in the order in whic
|
||||
|
||||
## OLED API
|
||||
|
||||
```C++
|
||||
// OLED Rotation enum values are flags
|
||||
```c
|
||||
// OLED rotation enum values are flags
|
||||
typedef enum {
|
||||
OLED_ROTATION_0 = 0,
|
||||
OLED_ROTATION_90 = 1,
|
||||
@@ -272,10 +275,10 @@ uint8_t oled_max_lines(void);
|
||||
|
||||
!> Scrolling and rotation are unsupported on the SH1106.
|
||||
|
||||
## SSD1306.h driver conversion guide
|
||||
## SSD1306.h Driver Conversion Guide
|
||||
|
||||
|Old API |Recommended New API |
|
||||
|---------------------------|-----------------------------------|
|
||||
|-------------------------|---------------------------------|
|
||||
|`struct CharacterMatrix` |*removed - delete all references*|
|
||||
|`iota_gfx_init` |`oled_init` |
|
||||
|`iota_gfx_on` |`oled_on` |
|
||||
|
||||
19
keyboards/handwired/eagleii/config.h
Normal file
19
keyboards/handwired/eagleii/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x9789
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Eagle
|
||||
#define PRODUCT II
|
||||
#define DESCRIPTION Eagle II Keyboard
|
||||
|
||||
#define MATRIX_ROWS 12
|
||||
#define MATRIX_COLS 12
|
||||
#define MATRIX_ROW_PINS { D0, B5, F1, B2, F7, F6, D4, D7, B4, B7, F5, B0 }
|
||||
#define MATRIX_COL_PINS { D2, C6, E6, D5, B3, D3, D1, C7, F0, B6, B1, F4 }
|
||||
#define UNUSED_PINS
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
#define DEBOUNCE 5
|
||||
1
keyboards/handwired/eagleii/eagleii.c
Normal file
1
keyboards/handwired/eagleii/eagleii.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "eagleii.h"
|
||||
24
keyboards/handwired/eagleii/eagleii.h
Normal file
24
keyboards/handwired/eagleii/eagleii.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K47, K27, K37, K38, K28, K39, K29, K34, K24, K31, K21, K32, K22, K33, K23, K0A, K0B, K46, K44, \
|
||||
K17, K97, K18, K98, K19, K99, K14, K94, K11, K91, K12, K92, K13, K83, K8A, K8B, K43, K4A, \
|
||||
KA0, K77, K88, K78, K89, K79, K84, K74, K81, K71, K82, K72, K93, K1A, K1B, K42, K6B, \
|
||||
K50, K87, K08, K68, K09, K69, K04, K61, K01, K62, K02, K70, K6A, K41, \
|
||||
KB5, K66, K07, K64, K76, K03 \
|
||||
) { \
|
||||
{ KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K07, K08, K09, K0A, K0B }, \
|
||||
{ KC_NO, K11, K12, K13, K14, KC_NO, KC_NO, K17, K18, K19, K1A, K1B }, \
|
||||
{ KC_NO, K21, K22, K23, K24, KC_NO, KC_NO, K27, K28, K29, KC_NO, KC_NO }, \
|
||||
{ KC_NO, K31, K32, K33, K34, KC_NO, KC_NO, K37, K38, K39, KC_NO, KC_NO }, \
|
||||
{ KC_NO, K41, K42, K43, K44, KC_NO, K46, K47, KC_NO, KC_NO, K4A, KC_NO }, \
|
||||
{ K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ KC_NO, K61, K62, KC_NO, K64, KC_NO, K66, KC_NO, K68, K69, K6A, K6B }, \
|
||||
{ K70, K71, K72, KC_NO, K74, KC_NO, K76, K77, K78, K79, KC_NO, KC_NO }, \
|
||||
{ KC_NO, K81, K82, K83, K84, KC_NO, KC_NO, K87, K88, K89, K8A, K8B }, \
|
||||
{ KC_NO, K91, K92, K93, K94, KC_NO, KC_NO, K97, K98, K99, KC_NO, KC_NO }, \
|
||||
{ KA0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
}
|
||||
88
keyboards/handwired/eagleii/info.json
Normal file
88
keyboards/handwired/eagleii/info.json
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"keyboard_name": "EagleII",
|
||||
"url": "",
|
||||
"maintainer": "Spaceman",
|
||||
"width": 21.5,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 74,
|
||||
"layout": [
|
||||
{"label":"K47 (F7,C7)", "x":0, "y":0, "w":1.5},
|
||||
{"label":"K27 (F1,C7)", "x":1.5, "y":0},
|
||||
{"label":"K37 (B2,C7)", "x":2.5, "y":0},
|
||||
{"label":"K38 (B2,F0)", "x":3.5, "y":0},
|
||||
{"label":"K28 (F1,F0)", "x":4.5, "y":0},
|
||||
{"label":"K39 (B2,B6)", "x":5.5, "y":0},
|
||||
{"label":"K29 (F1,B6)", "x":6.5, "y":0},
|
||||
{"label":"K34 (B2,B3)", "x":7.5, "y":0},
|
||||
{"label":"K24 (F1,B3)", "x":8.5, "y":0},
|
||||
{"label":"K31 (B2,C6)", "x":9.5, "y":0},
|
||||
{"label":"K21 (F1,C6)", "x":10.5, "y":0},
|
||||
{"label":"K32 (B2,E6)", "x":11.5, "y":0},
|
||||
{"label":"K22 (F1,E6)", "x":12.5, "y":0},
|
||||
{"label":"K33 (B2,D5)", "x":13.5, "y":0},
|
||||
{"label":"K23 (F1,D5)", "x":14.5, "y":0},
|
||||
{"label":"K0A (D0,B1)", "x":16.5, "y":0},
|
||||
{"label":"K0B (D0,F4)", "x":17.5, "y":0},
|
||||
{"label":"K46 (F7,D1)", "x":18.5, "y":0},
|
||||
{"label":"K44 (F7,B3)", "x":20.5, "y":0},
|
||||
{"label":"K17 (B5,C7)", "x":0, "y":1, "w":2},
|
||||
{"label":"K97 (B7,C7)", "x":2, "y":1},
|
||||
{"label":"K18 (B5,F0)", "x":3, "y":1},
|
||||
{"label":"K98 (B7,F0)", "x":4, "y":1},
|
||||
{"label":"K19 (B5,B6)", "x":5, "y":1},
|
||||
{"label":"K99 (B7,B6)", "x":6, "y":1},
|
||||
{"label":"K14 (B5,B3)", "x":7, "y":1},
|
||||
{"label":"K94 (B7,B3)", "x":8, "y":1},
|
||||
{"label":"K11 (B5,C6)", "x":9, "y":1},
|
||||
{"label":"K91 (B7,C6)", "x":10, "y":1},
|
||||
{"label":"K12 (B5,E6)", "x":11, "y":1},
|
||||
{"label":"K92 (B7,E6)", "x":12, "y":1},
|
||||
{"label":"K13 (B5,D5)", "x":13, "y":1},
|
||||
{"label":"K83 (B4,D5)", "x":14, "y":1, "w":1.5},
|
||||
{"label":"K8A (B4,B1)", "x":16.5, "y":1},
|
||||
{"label":"K8B (B4,F4)", "x":17.5, "y":1},
|
||||
{"label":"K43 (F7,D5)", "x":18.5, "y":1},
|
||||
{"label":"K4A (F7,B1)", "x":20.5, "y":1},
|
||||
{"label":"KA0 (F5,D2)", "x":0.25, "y":2, "w":2},
|
||||
{"label":"K77 (D7,C7)", "x":2.25, "y":2},
|
||||
{"label":"K88 (B4,F0)", "x":3.25, "y":2},
|
||||
{"label":"K78 (D7,F0)", "x":4.25, "y":2},
|
||||
{"label":"K89 (B4,B6)", "x":5.25, "y":2},
|
||||
{"label":"K79 (D7,B6)", "x":6.25, "y":2},
|
||||
{"label":"K84 (B4,B3)", "x":7.25, "y":2},
|
||||
{"label":"K74 (D7,B3)", "x":8.25, "y":2},
|
||||
{"label":"K81 (B4,C6)", "x":9.25, "y":2},
|
||||
{"label":"K71 (D7,C6)", "x":10.25, "y":2},
|
||||
{"label":"K82 (B4,E6)", "x":11.25, "y":2},
|
||||
{"label":"K72 (D7,E6)", "x":12.25, "y":2},
|
||||
{"label":"K93 (B7,D5)", "x":13.25, "y":2, "w":2},
|
||||
{"label":"K1A (B5,B1)", "x":16.5, "y":2},
|
||||
{"label":"K1B (B5,F4)", "x":17.5, "y":2},
|
||||
{"label":"K42 (F7,E6)", "x":18.5, "y":2},
|
||||
{"label":"K6B (D4,F4)", "x":20.5, "y":2, "h":2},
|
||||
{"label":"K50 (F6,D2)", "x":0.75, "y":3, "w":2},
|
||||
{"label":"K87 (B4,C7)", "x":2.75, "y":3},
|
||||
{"label":"K08 (D0,F0)", "x":3.75, "y":3},
|
||||
{"label":"K68 (D4,F0)", "x":4.75, "y":3},
|
||||
{"label":"K09 (D0,B6)", "x":5.75, "y":3},
|
||||
{"label":"K69 (D4,B6)", "x":6.75, "y":3},
|
||||
{"label":"K04 (D0,B3)", "x":7.75, "y":3},
|
||||
{"label":"K61 (D4,C6)", "x":8.75, "y":3},
|
||||
{"label":"K01 (D0,C6)", "x":9.75, "y":3},
|
||||
{"label":"K62 (D4,E6)", "x":10.75, "y":3},
|
||||
{"label":"K02 (D0,E6)", "x":11.75, "y":3},
|
||||
{"label":"K70 (D7,D2)", "x":12.75, "y":3, "w":2},
|
||||
{"label":"K6A (D4,B1)", "x":16.5, "y":3, "w":2},
|
||||
{"label":"K41 (F7,C6)", "x":18.5, "y":3},
|
||||
{"label":"KB5 (B0,D3)", "x":0.75, "y":4},
|
||||
{"label":"K66 (D4,D1)", "x":1.75, "y":4},
|
||||
{"label":"K07 (D0,C7)", "x":2.75, "y":4},
|
||||
{"label":"K64 (D4,B3)", "x":3.75, "y":4, "w":8},
|
||||
{"label":"K76 (D7,D1)", "x":11.75, "y":4},
|
||||
{"label":"K03 (D0,D5)", "x":12.75, "y":4, "w":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
12
keyboards/handwired/eagleii/keymaps/default/keymap.c
Normal file
12
keyboards/handwired/eagleii/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_LABK, KC_BSLS, KC_7, KC_8, KC_9, KC_F1,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_INS, KC_DEL, KC_SPC, KC_4, KC_5, KC_6, KC_F2,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_1, KC_2, KC_3, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_0, KC_DOT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_MENU, KC_RABK
|
||||
),
|
||||
|
||||
};
|
||||
15
keyboards/handwired/eagleii/readme.md
Normal file
15
keyboards/handwired/eagleii/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Eagle II Keyboard
|
||||
|
||||

|
||||
|
||||
A handwired conversion of an Eagle II computer.
|
||||
|
||||
* Keyboard Maintainer: [Spaceman](https://github.com/rionlion100)
|
||||
* Hardware Supported: Eagle II Keyboard
|
||||
* Hardware Availability: Not available
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/eagleii: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).
|
||||
26
keyboards/handwired/eagleii/rules.mk
Normal file
26
keyboards/handwired/eagleii/rules.mk
Normal file
@@ -0,0 +1,26 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
SLEEP_LED_ENABLE = no
|
||||
NKRO_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
252
keyboards/maartenwut/mx5160/config.h
Normal file
252
keyboards/maartenwut/mx5160/config.h
Normal file
@@ -0,0 +1,252 @@
|
||||
/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x4705
|
||||
#define PRODUCT_ID 0x5160
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Maartenwut
|
||||
#define PRODUCT MX-5160
|
||||
#define DESCRIPTION Replacement PCB for the Chicony 5160c
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/*
|
||||
* 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 {C6,C7,B5,B6,D7,B4,D4,D6,D5,D3}
|
||||
#define MATRIX_COL_PINS {D0,D1,D2,F7,F6,F5,F4,F1,F0,E6}
|
||||
#define UNUSED_PINS {B7,B0}
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
// For QMK DFU
|
||||
#define QMK_ESC_OUTPUT C6
|
||||
#define QMK_ESC_INPUT D1
|
||||
#define QMK_LED B1
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// /*== customize breathing effect ==*/
|
||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
// /*==== use exp() and sin() ====*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
// #endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
12
keyboards/maartenwut/mx5160/info.json
Normal file
12
keyboards/maartenwut/mx5160/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "mx5160",
|
||||
"url": "https://github.com/Maartenwut/mx-5160",
|
||||
"maintainer": "qmk",
|
||||
"width": 22,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":18, "y":0}, {"x":19, "y":0}, {"x":20, "y":0}, {"x":21, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1, "w":1.5}, {"x":18, "y":1}, {"x":19, "y":1}, {"x":20, "y":1}, {"x":21, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2}, {"x":16.25, "y":2, "w":1.25}, {"x":18, "y":2}, {"x":19, "y":2}, {"x":20, "y":2}, {"x":21, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.75}, {"x":16.5, "y":3}, {"x":18, "y":3}, {"x":19, "y":3}, {"x":20, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":1.5}, {"x":6.5, "y":4, "w":7}, {"x":13.5, "y":4, "w":1.5}, {"x":16, "y":4, "w":1.5}, {"x":18, "y":4}, {"x":19, "y":4}, {"x":20, "y":4}, {"x":21, "y":3, "h":2}]
|
||||
}
|
||||
}
|
||||
}
|
||||
41
keyboards/maartenwut/mx5160/keymaps/default/keymap.c
Normal file
41
keyboards/maartenwut/mx5160/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
#define _MA 0 //Main layer
|
||||
#define _FN 1 //Main layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MA] = LAYOUT_all(
|
||||
KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_F3, KC_F4, 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_P7, KC_P8, KC_P9, _______, \
|
||||
KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||
KC_F7, KC_F8, KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _______, KC_P1, KC_P2, KC_P3, \
|
||||
KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_P0, _______, KC_PDOT, KC_PENT), \
|
||||
|
||||
[_FN] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_PSCR, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \
|
||||
|
||||
};
|
||||
1
keyboards/maartenwut/mx5160/keymaps/default/readme.md
Normal file
1
keyboards/maartenwut/mx5160/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
This is the default keymap for the mx-5160 PCB.
|
||||
58
keyboards/maartenwut/mx5160/mx5160.c
Normal file
58
keyboards/maartenwut/mx5160/mx5160.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "mx5160.h"
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
//Set led pin as output, then high (off)
|
||||
|
||||
//Caps lock
|
||||
setPinOutput(B1);
|
||||
writePinHigh(B1);
|
||||
|
||||
//Num lock
|
||||
setPinOutput(B2);
|
||||
writePinHigh(B2);
|
||||
|
||||
//Scroll lock
|
||||
setPinOutput(B3);
|
||||
writePinHigh(B3);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if (res) {
|
||||
writePin(B2, !led_state.num_lock);
|
||||
writePin(B1, !led_state.caps_lock);
|
||||
writePin(B3, !led_state.scroll_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
47
keyboards/maartenwut/mx5160/mx5160.h
Normal file
47
keyboards/maartenwut/mx5160/mx5160.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#define XXX KC_NO
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_all( \
|
||||
k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k87, k17, k08, k18, k09, k19, \
|
||||
k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k38, k29, k39, \
|
||||
k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k48, k58, k49, k59, \
|
||||
k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k78, k69, \
|
||||
k80, k90, k81, k82, k94, k96, k97, k88, k98, k89, k99 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \
|
||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \
|
||||
{ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \
|
||||
{ k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \
|
||||
{ k70, k71, k72, k73, k74, k75, k76, k77, k78, XXX }, \
|
||||
{ k80, k81, k82, XXX, XXX, XXX, XXX, k87, k88, k89 }, \
|
||||
{ k90, XXX, XXX, XXX, k94, XXX, k96, k97, k98, k99 } \
|
||||
}
|
||||
15
keyboards/maartenwut/mx5160/readme.md
Normal file
15
keyboards/maartenwut/mx5160/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# mx5160
|
||||
|
||||

|
||||
|
||||
## Support
|
||||
* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut)
|
||||
* Hardware Supported: mx-5160 (Chicony 5160c case)
|
||||
* Hardware Availability: [Github](https://github.com/Maartenwut/mx-5160)
|
||||
|
||||
## Build
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make maartenwut/mx5160: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).
|
||||
33
keyboards/maartenwut/mx5160/rules.mk
Normal file
33
keyboards/maartenwut/mx5160/rules.mk
Normal file
@@ -0,0 +1,33 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
@@ -178,8 +178,9 @@ class ConfigurationSection(Configuration):
|
||||
|
||||
def __getitem__(self, key):
|
||||
"""Returns a config value, pulling from the `user` section as a fallback.
|
||||
This is called when the attribute is accessed either via the get method or through [ ] index.
|
||||
"""
|
||||
if key in self._config:
|
||||
if key in self._config and self._config.get(key) is not None:
|
||||
return self._config[key]
|
||||
|
||||
elif key in self.parent.user:
|
||||
@@ -187,6 +188,15 @@ class ConfigurationSection(Configuration):
|
||||
|
||||
return None
|
||||
|
||||
def __getattr__(self, key):
|
||||
"""Returns the config value from the `user` section.
|
||||
This is called when the attribute is accessed via dot notation but does not exists.
|
||||
"""
|
||||
if key in self.parent.user:
|
||||
return self.parent.user[key]
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def handle_store_boolean(self, *args, **kwargs):
|
||||
"""Does the add_argument for action='store_boolean'.
|
||||
@@ -501,7 +511,10 @@ class MILC(object):
|
||||
|
||||
if argument not in self.arg_only:
|
||||
# Find the argument's section
|
||||
if self._entrypoint.__name__ in self.default_arguments and argument in self.default_arguments[self._entrypoint.__name__]:
|
||||
# Underscores in command's names are converted to dashes during initialization.
|
||||
# TODO(Erovia) Find a better solution
|
||||
entrypoint_name = self._entrypoint.__name__.replace("_", "-")
|
||||
if entrypoint_name in self.default_arguments and argument in self.default_arguments[entrypoint_name]:
|
||||
argument_found = True
|
||||
section = self._entrypoint.__name__
|
||||
if argument in self.default_arguments['general']:
|
||||
@@ -513,13 +526,16 @@ class MILC(object):
|
||||
exit(1)
|
||||
|
||||
# Merge this argument into self.config
|
||||
if argument in self.default_arguments:
|
||||
if argument in self.default_arguments['general'] or argument in self.default_arguments[entrypoint_name]:
|
||||
arg_value = getattr(self.args, argument)
|
||||
if arg_value:
|
||||
if arg_value is not None:
|
||||
self.config[section][argument] = arg_value
|
||||
else:
|
||||
if argument not in self.config[section]:
|
||||
self.config[section][argument] = getattr(self.args, argument)
|
||||
if argument not in self.config[entrypoint_name]:
|
||||
# Check if the argument exist for this section
|
||||
arg = getattr(self.args, argument)
|
||||
if arg is not None:
|
||||
self.config[section][argument] = arg
|
||||
|
||||
self.release_lock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user