esp_hal

Module config

Source
Available on crate feature unstable only.
Expand description

§Configuration

§Overview

This module contains the initial configuration for the system.

§Configuration

In the esp_hal::init() method, we can configure different parameters for the system:

  • CPU clock configuration.
  • Watchdog configuration.

§Examples

§Default initialization

let peripherals = esp_hal::init(esp_hal::Config::default());

§Custom initialization

use esp_hal::clock::CpuClock;

let config =
esp_hal::Config::default().with_cpu_clock(CpuClock::max()).
    with_watchdog(esp_hal::config::WatchdogConfig::default().
    with_rwdt(esp_hal::config::WatchdogStatus::Enabled(fugit::MicrosDurationU64::millis(1000u64))));
let peripherals = esp_hal::init(config);

Structs§

Enums§