Struct lpc8xx_hal::syscon::Handle
source · [−]pub struct Handle { /* private fields */ }
Expand description
Handle to the SYSCON peripheral
This handle to the SYSCON peripheral provides access to the main part of the SYSCON API. It is also required by other parts of the HAL API to synchronize access the the underlying registers, wherever this is required.
Please refer to the module documentation for more information about the PMU.
Implementations
sourceimpl Handle
impl Handle
sourcepub fn enable_clock<P: ClockControl>(&mut self, peripheral: &P)
pub fn enable_clock<P: ClockControl>(&mut self, peripheral: &P)
Enable peripheral clock
Enables the clock for a peripheral or other hardware component. HAL users usually won’t have to call this method directly, as other peripheral APIs will do this for them.
sourcepub fn disable_clock<P: ClockControl>(&mut self, peripheral: &P)
pub fn disable_clock<P: ClockControl>(&mut self, peripheral: &P)
Disable peripheral clock
sourcepub fn assert_reset<P: ResetControl>(&mut self, peripheral: &P)
pub fn assert_reset<P: ResetControl>(&mut self, peripheral: &P)
Assert peripheral reset
sourcepub fn clear_reset<P: ResetControl>(&mut self, peripheral: &P)
pub fn clear_reset<P: ResetControl>(&mut self, peripheral: &P)
Clear peripheral reset
Clears the reset for a peripheral or other hardware component. HAL users usually won’t have to call this method directly, as other peripheral APIs will do this for them.
sourcepub fn power_up<P: AnalogBlock>(&mut self, peripheral: &P)
pub fn power_up<P: AnalogBlock>(&mut self, peripheral: &P)
Provide power to an analog block
HAL users usually won’t have to call this method themselves, as other peripheral APIs will do this for them.
sourcepub fn power_down<P: AnalogBlock>(&mut self, peripheral: &P)
pub fn power_down<P: AnalogBlock>(&mut self, peripheral: &P)
Remove power from an analog block
sourcepub fn enable_interrupt_wakeup<I>(&mut self)where
I: WakeUpInterrupt,
pub fn enable_interrupt_wakeup<I>(&mut self)where
I: WakeUpInterrupt,
Enable interrupt wake-up from deep-sleep and power-down modes
To use an interrupt for waking up the system from the deep-sleep and power-down modes, it needs to be enabled using this method, in addition to being enabled in the NVIC.
This method is not required when using the regular sleep mode.
sourcepub fn disable_interrupt_wakeup<I>(&mut self)where
I: WakeUpInterrupt,
pub fn disable_interrupt_wakeup<I>(&mut self)where
I: WakeUpInterrupt,
Disable interrupt wake-up from deep-sleep and power-down modes