Skip to content

reexport Peripherals at the root for convenience #78

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

Merged
merged 1 commit into from
Jan 16, 2018
Merged

Conversation

japaric
Copy link
Member

@japaric japaric commented Jan 16, 2018

No description provided.

@japaric
Copy link
Member Author

japaric commented Jan 16, 2018

@homunkulus r+

@homunkulus
Copy link
Contributor

📌 Commit 04353d4 has been approved by japaric

@homunkulus
Copy link
Contributor

⌛ Testing commit 04353d4 with merge 9173fae...

japaric pushed a commit that referenced this pull request Jan 16, 2018
reexport Peripherals at the root for convenience

None
@japaric
Copy link
Member Author

japaric commented Jan 16, 2018

Travis is having issues today. Tested locally. Merging.

@japaric japaric merged commit b03a7c4 into master Jan 16, 2018
@japaric japaric deleted the reexport branch January 16, 2018 19:05
adamgreig pushed a commit that referenced this pull request Jan 12, 2022
78: Modified the entry and exception macros to accept a closure. r=japaric a=sjroe

This allows:

```rust
entry!(|| {
    let mut x = 1;

    loop {
        x = x + 1;
    }
});
```

as well as allowing the original usage:

```rust
entry!(main);
fn main() -> ! {
    let mut x = 1;

    loop {
        x = x + 1;
    }
}
```

The same is true for exceptions:

```rust
exception!(*, |irqn: i16| {
    panic!("Unhandled exception (IRQn = {})", irqn);
});
```

Co-authored-by: Stephen Roe <[email protected]>
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