Skip to content

Commit d8517cb

Browse files
authored
first firmware release (#15)
1 parent 57f768c commit d8517cb

File tree

15 files changed

+1423
-0
lines changed

15 files changed

+1423
-0
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: build
2+
3+
on:
4+
workflow_call:
5+
6+
env:
7+
FIRMWARE_PATH: keyboards/bbrfkr/dynamis
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.10'
17+
- name: install qmk
18+
run: pip install qmk
19+
- name: setup qmk
20+
run: qmk setup -y -H ../qmk_firmware
21+
- name: replace soruce code
22+
run: >
23+
rm -rf ../qmk_firmware/$FIRMWARE_PATH &&
24+
cp -r firmware/qmk/dynamis ../qmk_firmware/$FIRMWARE_PATH
25+
- name: build firmware
26+
run: >
27+
cd ../qmk_firmware &&
28+
qmk compile -kb bbrfkr/dynamis -km via &&
29+
cd -
30+
- name: gather artifacts
31+
run: >
32+
mkdir artifacts &&
33+
cp ../qmk_firmware/.build/bbrfkr_dynamis_via.hex firmware/via/dynamis.json artifacts
34+
- uses: actions/upload-artifact@v3
35+
with:
36+
name: firmware
37+
path: ./artifacts/*
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: release-workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
uses: ./.github/workflows/release.yml

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: release
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
uses: ./.github/workflows/build.yml
9+
10+
release:
11+
runs-on: ubuntu-latest
12+
needs: build
13+
steps:
14+
- uses: actions/download-artifact@v3
15+
with:
16+
name: firmware
17+
path: ./artifacts
18+
- name: create release
19+
id: create_release
20+
uses: actions/create-release@v1
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
tag_name: ${{ github.ref }}
25+
release_name: Release ${{ github.ref }}
26+
draft: false
27+
prerelease: false
28+
- name: upload qmk firmware
29+
uses: actions/upload-release-asset@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
upload_url: ${{ steps.create_release.outputs.upload_url }}
34+
asset_path: ./artifacts/bbrfkr_dynamis_via.hex
35+
asset_name: bbrfkr_dynamis_via.hex
36+
asset_content_type: text/plain
37+
- name: upload via json
38+
uses: actions/upload-release-asset@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
upload_url: ${{ steps.create_release.outputs.upload_url }}
43+
asset_path: ./artifacts/dynamis.json
44+
asset_name: dynamis.json
45+
asset_content_type: application/json
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: test-workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
tags-ignore:
8+
- '*'
9+
10+
jobs:
11+
test:
12+
uses: ./.github/workflows/build.yml

firmware/qmk/dynamis/config.h

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* Copyright 2022 bbrfkr
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
#pragma once
18+
19+
#include "config_common.h"
20+
21+
/* key matrix */
22+
#define MATRIX_ROWS 10
23+
#define MATRIX_COLS 7
24+
#define MATRIX_ROW_PINS { B6, B4, D6, D5, D1, C6, B5, D7, D4, D0 }
25+
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 }
26+
27+
/* rgb num */
28+
#define RGBLED_NUM 10
29+
#define RGB_DI_PIN D3
30+
#define RGBLIGHT_EFFECT_BREATHING
31+
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
32+
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
33+
#define RGBLIGHT_EFFECT_SNAKE
34+
#define RGBLIGHT_EFFECT_KNIGHT
35+
#define RGBLIGHT_EFFECT_CHRISTMAS
36+
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
37+
#define RGBLIGHT_EFFECT_RGB_TEST
38+
#define RGBLIGHT_EFFECT_ALTERNATING
39+
#define RGBLIGHT_EFFECT_TWINKLE
40+
41+
/* COL2ROW, ROW2COL*/
42+
#define DIODE_DIRECTION COL2ROW
43+
44+
/* rotary encoder */
45+
#define ENCODERS_PAD_A { B7 }
46+
#define ENCODERS_PAD_B { E6 }
47+
48+
#define PMW33XX_CS_PIN SPI_SS_PIN
49+
#define POINTING_DEVICE_INVERT_Y

firmware/qmk/dynamis/dynamis.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* Copyright 2022 bbrfkr
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
#include "dynamis.h"
18+
19+
#ifdef ENCODER_ENABLE
20+
bool encoder_update_kb(uint8_t index, bool clockwise) {
21+
if (!encoder_update_user(index, clockwise)) { return false; }
22+
if (clockwise) {
23+
tap_code(layer_state == 0 ? KC_WH_D : KC_VOLD);
24+
} else {
25+
tap_code(layer_state == 0 ? KC_WH_U : KC_VOLU);
26+
}
27+
return true;
28+
}
29+
#endif

firmware/qmk/dynamis/dynamis.h

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/* Copyright 2022 bbrfkr
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
#pragma once
18+
19+
#include "quantum.h"
20+
21+
#define LAYOUT_ansi( \
22+
C00, C01, C02, C03, C04, C05, C06, C56, C55, C54, C53, C52, C51, C50, C90, \
23+
C10, C11, C12, C13, C14, C15, C16, C66, C65, C64, C63, C62, C61, C60, \
24+
C20, C21, C22, C23, C24, C25, C26, C76, C75, C74, C73, C72, C70, \
25+
C30, C31, C32, C33, C34, C35, C36, C86, C85, C84, C83, C82, C81, C80, C91, \
26+
C40, C41, C42, C43, C44, C45, C46, C96, C95, C94, C93, C92 \
27+
) \
28+
{ \
29+
{ C00, C01, C02, C03, C04, C05, C06 }, \
30+
{ C10, C11, C12, C13, C14, C15, C16 }, \
31+
{ C20, C21, C22, C23, C24, C25, C26 }, \
32+
{ C30, C31, C32, C33, C34, C35, C36 }, \
33+
{ C40, C41, C42, C43, C44, C45, C46 }, \
34+
{ C50, C51, C52, C53, C54, C55, C56 }, \
35+
{ C60, C61, C62, C63, C64, C65, C66 }, \
36+
{ C70, KC_NO, C72, C73, C74, C75, C76 }, \
37+
{ C80, C81, C82, C83, C84, C85, C86 }, \
38+
{ C90, C91, C92, C93, C94, C95, C96 } \
39+
}
40+
41+
#define LAYOUT_iso( \
42+
C00, C01, C02, C03, C04, C05, C06, C56, C55, C54, C53, C52, C51, C50, C90, \
43+
C10, C11, C12, C13, C14, C15, C16, C66, C65, C64, C63, C62, C61, \
44+
C20, C21, C22, C23, C24, C25, C26, C76, C75, C74, C73, C72, C71, C70, \
45+
C30, C31, C32, C33, C34, C35, C36, C86, C85, C84, C83, C82, C81, C80, C91, \
46+
C40, C41, C42, C43, C44, C45, C46, C96, C95, C94, C93, C92 \
47+
) \
48+
{ \
49+
{ C00, C01, C02, C03, C04, C05, C06 }, \
50+
{ C10, C11, C12, C13, C14, C15, C16 }, \
51+
{ C20, C21, C22, C23, C24, C25, C26 }, \
52+
{ C30, C31, C32, C33, C34, C35, C36 }, \
53+
{ C40, C41, C42, C43, C44, C45, C46 }, \
54+
{ C50, C51, C52, C53, C54, C55, C56 }, \
55+
{ KC_NO, C61, C62, C63, C64, C65, C66 }, \
56+
{ C70, C71, C72, C73, C74, C75, C76 }, \
57+
{ C80, C81, C82, C83, C84, C85, C86 }, \
58+
{ C90, C91, C92, C93, C94, C95, C96 } \
59+
}

0 commit comments

Comments
 (0)