Module esp32c2_hal::system
source · Expand description
System Control
Overview
This system
driver provides an interface to control and configure various
system-related features and peripherals on ESP chips. It includes
functionality to control peripheral clocks, manage software interrupts,
configure chip clocks, and control radio peripherals.
Software Interrupts
The SoftwareInterrupt
enum represents the available software interrupt
sources.
The SoftwareInterruptControl struct allows raising or resetting software
interrupts using the raise()
and reset()
methods. The behavior of these
methods depends on the specific chip variant.
Peripheral Clock Control
The PeripheralClockControl
struct controls the enablement of peripheral
clocks.
It provides an enable()
method to enable and reset specific peripherals.
The available peripherals are represented by the Peripheral
enum
Example
let peripherals = Peripherals::take();
let system = peripherals.SYSTEM.split();
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();
Structs
- Controls the configuration of the chip’s clocks.
- Controls the configuration of the chip’s clocks.
- The SYSTEM/DPORT splitted into it’s different logical parts.
Enums
- Peripherals which can be enabled via
PeripheralClockControl
Traits
- Control the radio peripheral clocks
- Extension trait to split a SYSTEM/DPORT peripheral in independent logical parts