Skip to content

Generate interrupt dispatch code. #156

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

Closed
wants to merge 1 commit into from

Conversation

dvc94ch
Copy link
Member

@dvc94ch dvc94ch commented Nov 14, 2017

Useful for architectures that prefer or mandate dispatching interrupts in
software. Adds #[derive(Debug)] for printing readable interrupt names.

@japaric
Copy link
Member

japaric commented Dec 9, 2017

Hey @dvc94ch. Thanks for the PR.

I think it would be more idiomatic to return Option or Result from Interrupt::from (or maybe even implement TryFrom) rather than panic! on invalid inputs.

Useful for architectures that prefer or mandate dispatching interrupts in
software. Adds #[derive(Debug)] for printing readable interrupt names.
@japaric
Copy link
Member

japaric commented Dec 20, 2017

Thanks for making the change, @dvc94ch. (I didn't get a notification so I didn't notice until now).

This LGTM now but the generated code needs to contain some feature gates because the TryFrom API is unstable. There are also some import errors:

error[E0405]: cannot find trait `TryFrom` in this scope

@dvc94ch
Copy link
Member Author

dvc94ch commented Mar 3, 2018

Superseded by #185

@dvc94ch dvc94ch closed this Mar 3, 2018
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