atsam-rs / atsam4-hal

Apache License 2.0
5 stars 3 forks source link

Added pub use on embedded_hal::watchdog traits so clients can use ena… #12

Closed john-terrell closed 3 years ago

john-terrell commented 3 years ago

…ble/disable on watchdog without having to "use" the embedded_hal.

I ran into this when disabling the new watchdog with the SAM4E BSP:

error[E0599]: no method named disable found for struct sam4e_xplained_pro::atsam4_hal::watchdog::Watchdog in the current scope --> examples/blinky.rs:68:36 68 Watchdog::new(peripherals.WDT).disable(); ^^^^^^^ method not found in sam4e_xplained_pro::atsam4_hal::watchdog::Watchdog
= help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a use for it: 7 use sam4e_xplained_pro::atsam4_hal::prelude::_embedded_hal_watchdog_WatchdogDisable;
haata commented 3 years ago

Looks good. You'll want to run cargo fmt first.