stm32-rs / fdcan

FDCAN peripheral driver for STM32 chips
Apache License 2.0
12 stars 14 forks source link

Compile error: no `Interrupts` in `interrupt` + others #28

Closed David-OConnor closed 1 year ago

David-OConnor commented 1 year ago

Using version 0.1.2. Compiling with this crate leads to this sequence of errors:

 error[E0432]: unresolved imports `super::interrupt::Interrupt`, `super::interrupt::Interrupts`
 --> C:\Users\david\.cargo\registry\src\github.com-1ecc6299db9ec823\fdcan-0.1.2\src\config.rs:1:28
  |
1 | pub use super::interrupt::{Interrupt, InterruptLine, Interrupts};
  |                            ^^^^^^^^^                 ^^^^^^^^^^ no `Interrupts` in `interrupt`
  |                            |
  |                            no `Interrupt` in `interrupt`

error[E0432]: unresolved imports `interrupt::Interrupt`, `interrupt::Interrupts`
  --> C:\Users\david\.cargo\registry\src\github.com-1ecc6299db9ec823\fdcan-0.1.2\src\lib.rs:59:17
   |
59 | use interrupt::{Interrupt, InterruptLine, Interrupts};
   |                 ^^^^^^^^^                 ^^^^^^^^^^ no `Interrupts` in `interrupt`
   |                 |
   |                 no `Interrupt` in `interrupt`
   |
help: consider importing this unresolved item instead
   |
59 | use interrupt::{crate::config::Interrupt;
   |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing this unresolved item instead
   |
59 | use interrupt::{Interrupt, InterruptLine, crate::config::Interrupts;
   |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `ir`
  --> C:\Users\david\.cargo\registry\src\github.com-1ecc6299db9ec823\fdcan-0.1.2\src\pac\fdcan.rs:63:24
   |
63 |     pub ir: crate::Reg<ir::IR_SPEC>,
   |                        ^^ use of undeclared crate or module `ir`

error[E0433]: failed to resolve: use of undeclared crate or module `ie`
  --> C:\Users\david\.cargo\registry\src\github.com-1ecc6299db9ec823\fdcan-0.1.2\src\pac\fdcan.rs:65:24
   |
65 |     pub ie: crate::Reg<ie::IE_SPEC>,
   |                        ^^ use of undeclared crate or module `ie`

error[E0433]: failed to resolve: use of undeclared crate or module `ils`
  --> C:\Users\david\.cargo\registry\src\github.com-1ecc6299db9ec823\fdcan-0.1.2\src\pac\fdcan.rs:67:25
   |
67 |     pub ils: crate::Reg<ils::ILS_SPEC>,
   |                         ^^^ use of undeclared crate or module `ils`
David-OConnor commented 1 year ago

Solved by @adamgreig: Requires fdcan_g0_g4_l5 or fdcan_h7 feature. Thanks!