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

Fix pioasm generating an enum member which doesn't match pio.h #2324

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

KewlKris
Copy link

@KewlKris KewlKris commented Mar 1, 2025

When including the .mov_status directive to configure STATUS based on an IRQ flag (ex: .mov_status irq set 0), pioasm generates code with a reference to "STATUS_IRQ_INDEX", but this is different from the member name as defined in pio.h.

This generated the following code:

sm_config_set_mov_status(&c, STATUS_IRQ_INDEX, 0);

And thus caused the compile error:

error: 'STATUS_IRQ_INDEX' undeclared (first use in this function); did you mean 'STATUS_IRQ_SET'?

This fix changes the generated name so it matches the enum.

The enum pio_mov_status_type expects the member name to be STATUS_IRQ_SET.
@lurch lurch added the pioasm label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants