esp_hal/soc/esp32c2/
mod.rs

1//! # SOC (System-on-Chip) module (ESP32-C2)
2//!
3//! ## Overview
4//!
5//! The `SOC` module provides access, functions and structures that are useful
6//! for interacting with various system-related peripherals on `ESP32-C2` chip.
7
8crate::unstable_module! {
9    pub mod efuse;
10    pub mod trng;
11}
12pub mod gpio;
13pub mod peripherals;
14
15/// The name of the chip ("esp32c2") as `&str`
16#[macro_export]
17macro_rules! chip {
18    () => {
19        "esp32c2"
20    };
21}
22
23/// A link to the Technical Reference Manual (TRM) for the chip.
24#[doc(hidden)]
25#[macro_export]
26macro_rules! trm_link {
27    () => { "https://www.espressif.com/sites/default/files/documentation/esp8684_technical_reference_manual_en.pdf" };
28}
29
30pub use chip;
31
32#[allow(unused)]
33pub(crate) mod registers {
34    pub const INTERRUPT_MAP_BASE: u32 = 0x600c2000;
35}
36
37pub(crate) mod constants {
38    use crate::time::Rate;
39
40    /// The lower bound of the system's DRAM (Data RAM) address space.
41    pub const SOC_DRAM_LOW: usize = 0x3FCA_0000;
42    /// The upper bound of the system's DRAM (Data RAM) address space.
43    pub const SOC_DRAM_HIGH: usize = 0x3FCE_0000;
44
45    /// RC FAST Clock value (Hertz).
46    pub const RC_FAST_CLK: Rate = Rate::from_khz(17500);
47}
48
49pub(crate) fn pre_init() {}