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

[ot] hw/opentitan: fix SPI device busy bit calculation #69

Closed

Conversation

nmoroze
Copy link

@nmoroze nmoroze commented Jun 14, 2024

This PR fixes an operator precedence bug in the virtual SPI device. I noticed that the SPI device's busy bit wasn't being set after receiving commands, regardless of how the command info register was configured. This change corrects the issue.

The cast to bool takes precedence over the &, so we need parens.
Otherwise, the busy bit is always evaluated as false.

Signed-off-by: Noah Moroze <[email protected]>
@loiclefort
Copy link

Thanks for the fix, merged as part of #71

@loiclefort loiclefort closed this Jul 5, 2024
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