pub trait Gate {
type MrccPeriphConfig: SPConfHelper;
// Required methods
unsafe fn enable_clock();
unsafe fn disable_clock();
unsafe fn assert_reset();
unsafe fn release_reset();
fn is_clock_enabled() -> bool;
fn is_reset_released() -> bool;
}Expand description
Trait describing an AHB clock gate that can be toggled through MRCC.
Required Associated Types§
Required Methods§
Sourceunsafe fn enable_clock()
unsafe fn enable_clock()
Sourceunsafe fn disable_clock()
unsafe fn disable_clock()
Disable the clock gate.
§SAFETY
There must be no active user of this peripheral when calling this method
Sourceunsafe fn assert_reset()
unsafe fn assert_reset()
Drive the peripheral into reset.
§SAFETY
There must be no active user of this peripheral when calling this method
Sourceunsafe fn release_reset()
unsafe fn release_reset()
Drive the peripheral out of reset.
§SAFETY
There must be no active user of this peripheral when calling this method
Sourcefn is_clock_enabled() -> bool
fn is_clock_enabled() -> bool
Return whether the clock gate for this peripheral is currently enabled.
Sourcefn is_reset_released() -> bool
fn is_reset_released() -> bool
Return whether the peripheral is currently held in reset.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.