diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-06-08 16:08:40 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-06-08 18:00:48 +0200 |
| commit | 921780e6bfb9bcb2cd087b8aa8b094d792c99fa2 (patch) | |
| tree | bd21fba9800471b860ca44e05567588dcc1afef7 /examples | |
| parent | 87ad66f2b4a5bfd36dfc8d8aad5492e9e3f915e6 (diff) | |
Make interrupt module more standard.
- Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`.
- Reexport the PAC interrupt enum in `embassy_xx::interrupt`.
This has a few advantages:
- The `embassy_xx::interrupt` module is now more "standard".
- It works with `cortex-m` functions for manipulating interrupts, for example.
- It works with RTIC.
- the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs.
- When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f7/build.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/stm32f7/build.rs b/examples/stm32f7/build.rs index c4e15f19c..2b5d412a9 100644 --- a/examples/stm32f7/build.rs +++ b/examples/stm32f7/build.rs | |||
| @@ -1,9 +1,8 @@ | |||
| 1 | //! adapted from https://github.com/stm32-rs/stm32f7xx-hal/blob/master/build.rs | 1 | //! adapted from https://github.com/stm32-rs/stm32f7xx-hal/blob/master/build.rs |
| 2 | use std::env; | ||
| 3 | use std::fs::File; | 2 | use std::fs::File; |
| 4 | use std::io::prelude::*; | 3 | use std::io::prelude::*; |
| 5 | use std::io::{self}; | ||
| 6 | use std::path::PathBuf; | 4 | use std::path::PathBuf; |
| 5 | use std::{env, io}; | ||
| 7 | 6 | ||
| 8 | #[derive(Debug)] | 7 | #[derive(Debug)] |
| 9 | enum Error { | 8 | enum Error { |
