Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Sheild Pteron36 #1364

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Conversation

harshitgoel96
Copy link

@harshitgoel96 harshitgoel96 commented Jun 26, 2022

Board/Shield Check-list

  • This board/shield is tested working on real hardware
  • Definitions follow the general style of other shields/boards upstream (Reference)
  • .zmk.yml metadata file added
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • General consistent formatting of DeviceTree files
  • Keymaps do not use deprecated key defines (Check using the upgrader tool)
  • &pro_micro used in favor of &pro_micro_d/a if applicable
  • If split, no name added for the right/peripheral half
  • Kconfig.defconfig file correctly wraps all configuration in conditional on the shield symbol
  • .conf file has optional extra features commented out
  • Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)

@Nicell
Copy link
Member

Nicell commented Jun 26, 2022

Hi @harshitgoel96! I see you didn't check the last part of the checklist. Do you plan to run a group buy or have this shield stocked in stores? If not, we would recommend putting this definition in a zmk-config repo.

@Nicell Nicell added the shields PRs and issues related to shields label Jun 26, 2022
config ZMK_KEYBOARD_NAME
default "Pteron36"

config ZMK_SPLIT_BLE_ROLE_CENTRAL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config ZMK_SPLIT_BLE_ROLE_CENTRAL
config ZMK_SPLIT_ROLE_CENTRAL

# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

# Uncomment the following line to enable the Lotus58 OLED Display
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to remove the display and encoder configs to not confuse users, if they aren't supported by the firmware yet.

@@ -0,0 +1,45 @@
/*
* Copyright (c) 2020 Pete Johanson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to fix the copyright headers in this file and others to Copyright (c) 2022 The ZMK Contributors as well.

compatible = "zmk,keymap";

default_layer {
// ------------------------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd either correct the commented layer diagrams or remove them altogether.

// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | |
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ |
// | | | | | | | | | |
bindings = <
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this identical to the MOUR layer?

@harshitgoel96
Copy link
Author

Hi @harshitgoel96! I see you didn't check the last part of the checklist. Do you plan to run a group buy or have this shield stocked in stores? If not, we would recommend putting this definition in a zmk-config repo.

@Nicell the keyboard does not have a group buy or official sales channel, its an opensourced project with pcb fabrication files available here
i will look into zmk-config repo

@harshitgoel96
Copy link
Author

@Nicell I did not find any separate zmk-config repo, is the process documented somewhere?

@caksoylar
Copy link
Contributor

@harshitgoel96 ZMK config repos refer to repos typically created via the user setup script for end users to use. As noted in the new shield documentation, custom shields can also live in this sort of config repos and the build system will pick up the shield definition when building.

Below are a few examples:

Copy link
Contributor

@lesshonor lesshonor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to make suggestions in good faith, but you already know this PR will not be merged and should close it out.

Comment on lines +25 to +28
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5)RC(0,6) RC(0,7) RC(0,8) RC(0,9)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
RC(3,0) RC(3,1) RC(3,2) RC(3,7) RC(3,8) RC(3,9)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5)RC(0,6) RC(0,7) RC(0,8) RC(0,9)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
RC(3,0) RC(3,1) RC(3,2) RC(3,7) RC(3,8) RC(3,9)
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,8) RC(0,7) RC(0,6) RC(0,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,9) RC(1,8) RC(1,7) RC(1,6) RC(1,5)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,9) RC(2,8) RC(2,7) RC(2,6) RC(2,5)
RC(3,0) RC(3,1) RC(3,2) RC(3,7) RC(3,6) RC(3,5)

If you reorder the transform, you can use the same col-gpios for both sides.

Comment on lines +34 to +35
label = "KSCAN";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label = "KSCAN";

The label attribute has been deprecated here.

, <&pro_micro 8 (GPIO_ACTIVE_HIGH )>
, <&pro_micro 9 (GPIO_ACTIVE_HIGH )>
;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
col-gpios
= <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;

Comment on lines +39 to +41
, <&pro_micro 6 (GPIO_ACTIVE_HIGH )>
, <&pro_micro 8 (GPIO_ACTIVE_HIGH )>
, <&pro_micro 9 (GPIO_ACTIVE_HIGH )>
Copy link
Contributor

@lesshonor lesshonor Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZMK's standard is to use spaces for indentation instead of tabs. Installing and running pre-commit will correct formatting issues.

Suggested change
, <&pro_micro 6 (GPIO_ACTIVE_HIGH )>
, <&pro_micro 8 (GPIO_ACTIVE_HIGH )>
, <&pro_micro 9 (GPIO_ACTIVE_HIGH )>
, <&pro_micro 6 (GPIO_ACTIVE_HIGH)>
, <&pro_micro 8 (GPIO_ACTIVE_HIGH)>
, <&pro_micro 9 (GPIO_ACTIVE_HIGH)>

Comment on lines +8 to +16

&kscan0 {
col-gpios
= <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&kscan0 {
col-gpios
= <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;

Moved to app/boards/shields/pteron36/pteron36.dtsi.

Comment on lines +12 to +20

&kscan0 {
col-gpios
= <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&kscan0 {
col-gpios
= <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;

Moved to app/boards/shields/pteron36/pteron36.dtsi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shields PRs and issues related to shields
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants