-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(templates): Add interconnect selection
When using "zmk keyboard new" to create a shield, it will now ask you to select an interconnect. The generated template will set this as the "requires" value in the .zmk.yml file and will use the correct GPIO node label in devicetree code. Also fixed an issue where adding a feature to the .zmk.yml file that wasn't explicitly listed in the Python types would cause an error.
- Loading branch information
1 parent
560eeea
commit e011f98
Showing
15 changed files
with
140 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<%page args="node = '&gpio0'" /> | ||
&kscan { | ||
// Replace these comments with the GPIO pins in the matrix for the left side. | ||
// See https://zmk.dev/docs/development/hardware-integration/new-shield#shield-overlays | ||
col-gpios | ||
= </* ${node} 0 */ GPIO_ACTIVE_HIGH> | ||
, </* ${node} 0 */ GPIO_ACTIVE_HIGH> | ||
= <${gpio} 0 GPIO_ACTIVE_HIGH> | ||
, <${gpio} 0 GPIO_ACTIVE_HIGH> | ||
; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%inherit file="/common/hardware.zmk.yml" /> | ||
# Set this to the interconnect the shield uses. | ||
# Run "zmk keyboard list --type interconnect" to get the possible values. | ||
% if interconnect: | ||
requires: | ||
- pro_micro | ||
- ${interconnect} | ||
% endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<%inherit file="/common/shield.overlay" /> | ||
<%block name="kscan"> | ||
<%include file="/common/kscan.dtsi" args="node = '&pro_micro'" /> | ||
<%include file="/common/kscan.dtsi" /> | ||
</%block> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%inherit file="/common/hardware.zmk.yml" /> | ||
# Set this to the interconnect the shield uses. | ||
# Run "zmk keyboard list --type interconnect" to get the possible values. | ||
% if interconnect: | ||
requires: | ||
- pro_micro | ||
- ${interconnect} | ||
% endif |