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

Add/merge port/board specific sections (pins) into machine.pyi #726

Open
1 of 3 tasks
Josverl opened this issue Oct 25, 2023 · 0 comments
Open
1 of 3 tasks

Add/merge port/board specific sections (pins) into machine.pyi #726

Josverl opened this issue Oct 25, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Josverl
Copy link
Owner

Josverl commented Oct 25, 2023

Example : the rp2 machine.pyi
https://github.com/paulober/Pico-W-Stub/blob/main/frozen/umachine.pyi
possibly based on ports/<port>/boards<board>/pins.csv ? for each board

  • Use Pin Class for GP.* / EXT_GP.* members
  • update init signature
  • add comments based on Pins
    class cpu:
        GPIO20: Incomplete
        GPIO25: Incomplete
        GPIO26: Incomplete

    class board:
        GP3: Incomplete
        GP28: Incomplete
        GP4: Incomplete
        GP5: Incomplete

to

    class board():
        GP0 : Pin
        """ <class 'Pin'> = Pin(GPIO0, mode=ALT, pull=PULL_DOWN, alt=31) """
        GP1 : Pin
        """ <class 'Pin'> = Pin(GPIO1, mode=ALT, pull=PULL_DOWN, alt=31) """


    class cpu():

        EXT_GPIO0 : Pin
        """ <class 'Pin'> = Pin(EXT_GPIO0, mode=IN) """
        EXT_GPIO1 : Pin
        """ <class 'Pin'> = Pin(EXT_GPIO1, mode=IN) """
        EXT_GPIO2 : Pin
        """ <class 'Pin'> = Pin(EXT_GPIO2, mode=IN) """
        GPIO0 : Pin
        """ <class 'Pin'> = Pin(GPIO0, mode=ALT, pull=PULL_DOWN, alt=31) """
@Josverl Josverl added the enhancement New feature or request label Oct 25, 2023
@Josverl Josverl changed the title Add/merge port specific sections into machine.pyi Add/merge port/board specific sections (pins) into machine.pyi Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant