Skip to content

Commit

Permalink
add a key to flash the dongle
Browse files Browse the repository at this point in the history
  • Loading branch information
ctranstrum committed Mar 1, 2024
1 parent 8a3726d commit 8c605c1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum output_symbol {
};

enum selection_line_state {
selection_line_state_unknown,
selection_line_state_usb,
selection_line_state_bt
} current_selection_line_state;
Expand Down
50 changes: 5 additions & 45 deletions config/boards/shields/dongle_display/widgets/output_status_sym.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_1 uin
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x18,
0x38,
0x78,
0x18,
0x18,
0x18,
0x18,
0x18,
0x7e,
0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e,
};

const lv_img_dsc_t sym_1 = {
Expand All @@ -48,15 +40,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_2 uin
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x7c,
0xc6,
0x06,
0x0c,
0x18,
0x30,
0x60,
0xc6,
0xfe,
0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0xfe,
};

const lv_img_dsc_t sym_2 = {
Expand All @@ -77,15 +61,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_3 uin
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x7c,
0xc6,
0x06,
0x06,
0x3c,
0x06,
0x06,
0xc6,
0x7c,
0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0xc6, 0x7c,
};

const lv_img_dsc_t sym_3 = {
Expand All @@ -106,15 +82,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_4 uin
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x0c,
0x1c,
0x3c,
0x6c,
0xcc,
0xfe,
0x0c,
0x0c,
0x1e,
0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x1e,
};

const lv_img_dsc_t sym_4 = {
Expand All @@ -135,15 +103,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_5 uin
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0xfe,
0xc0,
0xc0,
0xc0,
0xfc,
0x06,
0x06,
0xc6,
0x78,
0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0xc6, 0x78,
};

const lv_img_dsc_t sym_5 = {
Expand Down
3 changes: 3 additions & 0 deletions config/totem.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
# Set defaults for macros
CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS=35
CONFIG_ZMK_MACRO_DEFAULT_TAP_MS=35

# Get CapsLock status
CONFIG_ZMK_HID_INDICATORS=y
18 changes: 12 additions & 6 deletions config/totem.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define L_MEDIA 9
#define L_KEYBD 10

// Define key positions for macros using Colemak key names
// Define key positions for combos using Colemak key names
// Q W F P B J L U Y '
// A R S T G M N E I O
// bsp Z X C D V K H , . / ret
Expand Down Expand Up @@ -412,6 +412,12 @@
<&macro_param_1to2 &bt BT_SEL MACRO_PLACEHOLDER>;
};

flash: dongle_bootloader_macro {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&bootloader>;
};

tmux: tmux_prefix_macro {
compatible = "zmk,behavior-macro-one-param";
#binding-cells = <1>;
Expand Down Expand Up @@ -712,7 +718,7 @@ ___ ___ ___ ___ ___ ___ ___ &tmux N1 &tmux N2 &tmux N3 ___ &tmux
display-name = "keyboard" ;
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━┛
// ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓
// ┃ qwrty ┃ ┃ usb ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┃ qwrty ┃ ┃ usb ┃ ┃ ┃ ┃ ┃ ┃ dongl ┃ ┃ ┃
// ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫
// ┃ BT1 ┃ BT2 ┃ BT3 ┃ BT4 ┃ BT5 ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┏━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┓
Expand All @@ -721,11 +727,11 @@ ___ ___ ___ ___ ___ ___ ___ &tmux N1 &tmux N2 &tmux N3 ___ &tmux
// ┃ ┃ ┃ CAPS ┃ ┃ ┃ ┃ ### ┃
// ┗━━━━━━━┻━━━━━━━┻━━━━━━━┛ ┗━━━━━━━┻━━━━━━━┻━━━━━━━┛
bindings = <
// ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
// ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷

&to L_QWRTY ___ &out OUT_USB ___ ___ ___ ___ ___ ___ ___
BT_KEY(0) BT_KEY(1) BT_KEY(2) BT_KEY(3) BT_KEY(4) ___ ___ ___ ___ ___
&bootloader ___ ___ &to L_COLMK &to L_DVORK ___ ___ ___ ___ ___ ___ &bootloader
&to L_QWRTY ___ &out OUT_USB ___ ___ ___ ___ &flash ___ ___
BT_KEY(0) BT_KEY(1) BT_KEY(2) BT_KEY(3) BT_KEY(4) ___ ___ ___ ___ ___
&bootloader ___ ___ &to L_COLMK &to L_DVORK ___ ___ ___ ___ ___ ___ &bootloader
___ ___ &kp CAPSLOCK ___ ___ &trans
>;
};
Expand Down

0 comments on commit 8c605c1

Please sign in to comment.