files for compiling a firmware

This commit is contained in:
ItzAdel 2022-01-01 17:21:31 +04:00
parent b41df92878
commit 315b96d492
15 changed files with 356 additions and 0 deletions

29
firmware/README.md Normal file
View File

@ -0,0 +1,29 @@
# AWF firmware (by [@ItzAdel](https://github.com/ItzAdel) and [@nm17](https://github.com/nm17))
AWF is a ergo-split keyboard with 46 keys, originally designed for a school project.
https://github.com/ItzAdel/AWF-firmware
### How to compile firmware?
1) First you need to download QMK MSYS and enter the command in it:
```
qmk setup
```
2) After we installed QMK you need to create a folder called "angelwings" in the path:
```
"c:/users/user/qmk_firmware/keyboards"
```
and unpack all firmware files into the folder "angelwings".
3) The last step is compilation. Enter into QMK MSYS command:
```
qmk compile -kb angelwings -km default
```
or if you want VIA port:
```
qmk compile -kb angelwings -km via
```
4) If your firmware compiled - then let's have fun!
### Check out @tfk004 on Telegram. https://t.me/tfk004

1
firmware/angelwings.c Normal file
View File

@ -0,0 +1 @@
#include "angelwings.h"

7
firmware/angelwings.h Normal file
View File

@ -0,0 +1,7 @@
#pragma once
#ifdef KEYBOARD_angelwings_rev1
# include "rev1.h"
#endif
#include "quantum.h"

31
firmware/config.h Normal file
View File

@ -0,0 +1,31 @@
#pragma once
#include "config_common.h"
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER Doryan_and_nm17
#define PRODUCT Angelwings Keyboard
#define DESCRIPTION Split 40 percent ergo-keyboard
/* key matrix size */
/* Rows are doubled up */
#define MATRIX_ROWS 8
#define MATRIX_COLS 7
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
#define UNUSED_PINS
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define RGBLED_NUM 46

43
firmware/info.json Normal file
View File

@ -0,0 +1,43 @@
{
"name": "AngelWings",
"vendorId": "0xFEED",
"productId": "0x0000",
"lighting": "qmk_rgblight",
"matrix": {
"rows": 8,
"cols": 7
},
"layouts": {
"LAYOUT": {
"layout": [
[{"x":4},"0,4",{"x":6.5},"0,9"],
[{"y":-0.9,"x":5},"0,5"],
[{"y":-1,"x":10.5},"0,8"],
[{"y":-0.87,"x":6},"0,6",{"x":2.5},"0,7"],
[{"y":-0.98,"x":3},"0,3",{"x":8.5},"0,10"],
[{"y":-0.65,"x":2},"0,2",{"x":10.5},"0,11"],
[{"y":-0.85,"x":1},"0,1",{"x":12.5},"0,12"],
[{"y":-0.75,"x":4},"1,4",{"x":6.5},"1,9"],
[{"y":-0.9,"x":5},"1,5",{"x":4.5},"1,8"],
[{"y":-0.87,"x":6},"1,6",{"x":2.5},"1,7"],
[{"y":-0.98,"x":3},"1,3",{"x":8.5},"1,10"],
[{"y":-0.8},"0,0",{"x":14.5},"0,13"],
[{"y":-0.85,"x":2},"1,2",{"x":10.5},"1,11"],
[{"y":-0.85,"x":1},"1,1",{"x":12.5},"1,12"],
[{"y":-0.75,"x":4},"2,4",{"x":6.5},"2,9"],
[{"y":-0.9,"x":5},"2,5",{"x":4.5},"2,8"],
[{"y":-0.87,"x":6},"2,6",{"x":2.5},"2,7"],
[{"y":-0.98,"x":3},"2,3",{"x":8.5},"2,10"],
[{"y":-0.8},"1,0",{"x":14.5},"1,13"],
[{"y":-0.85,"x":2},"2,2",{"x":10.5},"2,11"],
[{"y":-0.85,"x":1},"2,1",{"x":12.5},"2,12"],
[{"y":-0.59,"x":4.5},"3,4"],
[{"y":3.16,"x":-0.5},"3,9"],
[{"y":-1.45,"x":0.4},"3,5"],
[{"y":-1.83,"x":1.25,"h":1.5},"3,6"],
[{"y":-2.28,"x":-2.27,"h":1.5},"3,7"],
[{"y":-0.17,"x":-1.41},"3,8"]
]
}
}
}

View File

@ -0,0 +1,14 @@
#pragma once
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# define RGBLED_NUM 54
# undef RGBLED_SPLIT
# define RGBLED_SPLIT \
{ 23, 23 }
# define RGBLIGHT_LIMIT_VAL 130
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
#endif

View File

@ -0,0 +1,68 @@
#include QMK_KEYBOARD_H
enum layers {
_QWERTY = 0,
_LOWER,
_RAISE,
_ADJUST,
};
#define KC______ KC_TRNS
#define KC_XXXXX KC_NO
#define KC_LOWER LOWER
#define KC_RAISE RAISE
#define KC_LTOG RGB_TOG
#define KC_LHUI RGB_HUI
#define KC_LHUD RGB_HUD
#define KC_LSAI RGB_SAI
#define KC_LSAD RGB_SAD
#define KC_LVAI RGB_VAI
#define KC_LVAD RGB_VAD
#define KC_LMOD RGB_MOD
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define BSL_RAL MT(MOD_RALT, KC_BSLS)
#define BSP_LSH MT(MOD_LSFT, KC_BSPC)
#define SPC_RSH MT(MOD_RSFT, KC_SPC)
#define DEL_RSE LT(_RAISE, KC_DEL)
#define TAB_RSE LT(_RAISE, KC_TAB)
#define GUI_LWR LT(_LOWER, KC_LGUI)
#define ENT_LWR LT(_LOWER, KC_ENT)
#define PUP_ADJ LT(_ADJUST, KC_PGUP)
#define PDN_ADJ LT(_ADJUST, KC_PGDN)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_ESC, KC_GRV, 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_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), KC_PGUP,
KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, BSL_RAL,
DEL_RSE, BSP_LSH, GUI_LWR, ENT_LWR, SPC_RSH, TAB_RSE
),
[_LOWER] = LAYOUT(
KC_MUTE, KC_UNDS, 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_PPLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL, _______,
KC_PMNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, _______, _______, _______, _______, _______
),
[_RAISE] = LAYOUT(
_______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_END, KC_HOME, KC_UP, KC_PSCR, KC_SLCK, KC_CAPS, _______,
KC_VOLU, KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_APP, KC_VOLD,
_______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, _______, KC_END, _______, KC_PGDN, KC_PAUS, _______,
_______, _______, _______, _______, _______, _______
),
[_ADJUST] = LAYOUT(
_______, _______, KC_ASUP, KC_ASTG, KC_ASDN, KC_WH_U, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______,
_______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_WH_D, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______,
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______,
_______, _______, _______, _______, _______, _______
),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}

View File

@ -0,0 +1,18 @@
#pragma once
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
#define VIAL_KEYBOARD_UID {0x36, 0xD0, 0xD6, 0xF2, 0x86, 0x32, 0x14, 0x28}
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# define RGBLED_NUM 54
# undef RGBLED_SPLIT
# define RGBLED_SPLIT \
{ 23, 23 }
# define RGBLIGHT_LIMIT_VAL 130
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
#endif

View File

@ -0,0 +1,30 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_GRV, 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_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), KC_PGDN,
KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RALT, KC_BSLS),
LT(2, KC_DEL), LSFT_T(KC_BSPC), LT(1, KC_LGUI), LT(1, KC_ENT), RSFT_T(KC_SPC), LT(2, KC_TAB)
),
[1] = LAYOUT(
KC_MUTE, KC_UNDS, 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_PPLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL, _______,
KC_PMNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, _______, _______, _______, _______, _______
),
[2] = LAYOUT(
_______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_END, KC_HOME, KC_UP, KC_PSCR, KC_SLCK, KC_CAPS, _______,
KC_VOLU, KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_APP, KC_VOLD,
_______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, _______, KC_END, _______, KC_PGDN, KC_PAUS, _______,
_______, _______, _______, _______, _______, _______
),
[3] = LAYOUT(
_______, _______, KC_ASUP, KC_ASTG, KC_ASDN, KC_WH_U, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______,
_______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_WH_D, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______,
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______,
_______, _______, _______, _______, _______, _______
),
};

View File

@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

22
firmware/rev1/config.h Normal file
View File

@ -0,0 +1,22 @@
#pragma once
#define USE_SERIAL
#define SOFT_SERIAL_PIN D3
#define RGB_DI_PIN D2
#ifdef RGBLIGHT_ENABLE
# undef RGBLED_NUM
# define RGBLIGHT_ANIMATIONS
# define RGBLED_NUM 54
# define RGBLED_SPLIT \
{ 23, 23 }
# define RGBLIGHT_SPLIT
# define RGBLIGHT_LIMIT_VAL 130
# define RGBLIGHT_HUE_STEP 10
# define RGBLIGHT_SAT_STEP 17
# define RGBLIGHT_VAL_STEP 17
# define SPLIT_TRANSPORT_MIRROR
#endif
#define DIODE_DIRECTION COL2ROW

44
firmware/rev1/rev1.c Normal file
View File

@ -0,0 +1,44 @@
#include "rev1.h"
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {
{
{ 23, 19, 18, 13, 12, 5, 4 },
{ 22, 20, 17, 14, 11, 6, 3 },
{ NO_LED, 21, 16, 15, 10, 7, 2 },
{ NO_LED, NO_LED, NO_LED, NO_LED, 9, 8, 1 },
{ 46, 42, 41, 36, 35, 28, 27 },
{ 45, 43, 40, 37, 34, 29, 26 },
{ NO_LED, 44, 39, 38, 33, 30, 25 },
{ NO_LED, NO_LED, NO_LED, NO_LED, 32, 31, 24 },
},
{
{ 110, 63 }, { 102, 46 }, { 102, 25 }, { 102, 4 }, { 85, 2 }, { 85, 23 }, { 85, 44 },
{ 98, 63 }, { 76, 63 }, { 68, 42 }, { 68, 21 }, { 68, 0 }, { 51, 5 }, { 51, 26 },
{ 51, 47 }, { 34, 54 }, { 34, 33 }, { 34, 12 }, { 17, 15 }, { 17, 36 }, { 17, 57 },
{ 0, 51 }, { 0, 30 }, { 111, 63 }, { 119, 46 }, { 119, 25 }, { 119, 4 }, { 136, 2 },
{ 136, 23 }, { 136, 44 }, { 123, 63 }, { 153, 63 }, { 153, 42 }, { 153, 21 }, { 153, 0 },
{ 170, 5 }, { 170, 26 }, { 170, 47 }, { 187, 54 }, { 187, 33 }, { 187, 12 }, { 204, 15 },
{ 204, 36 }, { 204, 57 }, { 221, 51 }, { 221, 30 }
},
{
4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4,
}
};
void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
#endif

24
firmware/rev1/rev1.h Normal file
View File

@ -0,0 +1,24 @@
#pragma once
#include "quantum.h"
#include "angelwings.h"
#define XXX KC_NO
#define LAYOUT(\
L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, \
L34, L35, L36, R30, R31, R32 \
)\
{\
{L00, L01, L02, L03, L04, L05, L06}, \
{L10, L11, L12, L13, L14, L15, L16}, \
{XXX, L21, L22, L23, L24, L25, L26}, \
{XXX, XXX, XXX, XXX, L34, L35, L36}, \
{R06, R05, R04, R03, R02, R01, R00}, \
{R16, R15, R14, R13, R12, R11, R10}, \
{XXX, R25, R24, R23, R22, R21, R20}, \
{XXX, XXX, XXX, XXX, R32, R31, R30} \
}

1
firmware/rev1/rules.mk Normal file
View File

@ -0,0 +1 @@
OLED_DRIVER_ENABLE = no # Enables the use of OLED displays

22
firmware/rules.mk Normal file
View File

@ -0,0 +1,22 @@
MCU = atmega32u4
BOOTLOADER = caterina
BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
SLEEP_LED_ENABLE = no
NKRO_ENABLE = no
BACKLIGHT_ENABLE = no
MIDI_ENABLE = no
UNICODE_ENABLE = no
BLUETOOTH_ENABLE = no
AUDIO_ENABLE = no
FAUXCLICKY_ENABLE = no
HD44780_ENABLE = no
SPLIT_KEYBOARD = yes
RGBLIGHT_ENABLE = yes
RGB_MATRIX_ENABLE = no
DEFAULT_FOLDER = angelwings/rev1
RGBLIGHT_SUPPORTED = yes
RGB_MATRIX_SUPPORTED = yes