#![no_std]
#![no_main]
#![deny(
clippy::mem_forget,
reason = "mem::forget is generally not safe to do with esp_hal types, especially those \
holding buffers for the duration of a data transfer."
)]
use defmt::info;
use esp_hal::clock::CpuClock;
use esp_hal::delay::Delay;
use esp_hal::gpio::OutputConfig;
use esp_hal::gpio::{Level, Output};
use esp_hal::main;
use panic_rtt_target as _;
extern crate alloc;
// This creates a default app-descriptor required by the esp-idf bootloader.
// For more information see: <https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/app_image_format.html#application-description>
esp_bootloader_esp_idf::esp_app_desc!();
#[main]
fn main() -> ! {
// generator version: 0.6.0
rtt_target::rtt_init_defmt!();
let config = esp_hal::Config::default().with_cpu_clock(CpuClock::max());
let peripherals = esp_hal::init(config);
esp_alloc::heap_allocator!(#[unsafe(link_section = ".dram2_uninit")] size: 73744);
let mut led = Output::new(peripherals.GPIO4, Level::High, OutputConfig::default());
let delay = Delay::new();
loop {
info!("Hello world!");
led.toggle();
delay.delay_millis(500);
}
}
Loading
esp32-s3-devkitc-1
esp32-s3-devkitc-1