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 public_labels to pio_kwargs #62

Closed
wants to merge 1 commit into from

Conversation

Gebhartj
Copy link
Contributor

No description provided.

@tannewt tannewt requested a review from jepler January 24, 2024 18:14
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

I think that the correct place for this information is not in the "pio_kwargs", because a program which uses this feature would not be able to pass **program.pio_kwargs to the StateMachine constructor.

Instead, it should go in some other property of the Program object.

I would also like to see a test added. The test would assemble a PIO program that uses public labels, and then assert that the new public_labels property has the expected value.

Finally, there may be some feature in the circuitpython core that is needed to make this useful, since a PIO program can be loaded at an offset other than 0. Right now, I don't think there's a way to find the load offset from a StateMachine object. (incidentally this is the only reason that I added and then used ".offset" for some personal code: so that I could "jmp 0" under Python control...)

Thank you! Please feel free to give me a direct ping if I overlook your update of this PR.

@jepler
Copy link
Member

jepler commented Sep 20, 2024

I've added #72 as an alternative to this. It creates a new public_labels property on Program objects. Please let us know in a comment if this fits your use cases.

@jepler jepler closed this in #72 Sep 24, 2024
@jepler
Copy link
Member

jepler commented Sep 24, 2024

Thanks for offering this improvement! While we didn't ultimately merge your PR we implemented similar functionality in #72 so please check it out. You're encouraged to open further issues or PRs if your needs still aren't met.

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

Successfully merging this pull request may close these issues.

2 participants