pub trait ClockControl {
// Required methods
fn enable_clock(&self, s: &mut Syscon);
fn disable_clock(&self, s: &mut Syscon);
fn is_clock_enabled(&self, s: &Syscon) -> bool;
}Expand description
Internal trait for controlling peripheral clocks
This trait is an internal implementation detail and should neither be implemented nor used outside of LPC82x HAL. Any changes to this trait won’t be considered breaking changes.
Compared to https://git.io/fjpf9 (in lpc-rs/lpc8xx-hal/lpc8xx-hal-common) we use a less minimal API in order to hide the fact that there are three different AHLBCKLCTRL?, which a HAL user shouldn’t really need to know about.
Required Methods§
Sourcefn enable_clock(&self, s: &mut Syscon)
fn enable_clock(&self, s: &mut Syscon)
Internal method to enable a peripheral clock
Sourcefn disable_clock(&self, s: &mut Syscon)
fn disable_clock(&self, s: &mut Syscon)
Internal method to disable a peripheral clock
Sourcefn is_clock_enabled(&self, s: &Syscon) -> bool
fn is_clock_enabled(&self, s: &Syscon) -> bool
Check if peripheral clock is enabled