meow
This commit is contained in:
parent
303db64fda
commit
caf9134210
4 changed files with 3819 additions and 1476 deletions
|
|
@ -3,7 +3,7 @@ target = "xtensa-esp32s2-espidf"
|
||||||
|
|
||||||
[target.xtensa-esp32s2-espidf]
|
[target.xtensa-esp32s2-espidf]
|
||||||
linker = "ldproxy"
|
linker = "ldproxy"
|
||||||
runner = "espflash flash --monitor"
|
runner = "espflash flash --monitor --before no-reset -a no-reset --no-stub"
|
||||||
rustflags = [ "--cfg", "espidf_time64"]
|
rustflags = [ "--cfg", "espidf_time64"]
|
||||||
|
|
||||||
[unstable]
|
[unstable]
|
||||||
|
|
@ -13,4 +13,3 @@ build-std = ["std", "panic_abort"]
|
||||||
MCU="esp32s2"
|
MCU="esp32s2"
|
||||||
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
|
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
|
||||||
ESP_IDF_VERSION = "v5.3.2"
|
ESP_IDF_VERSION = "v5.3.2"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,5 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=8000
|
||||||
# Workaround for https://github.com/espressif/esp-idf/issues/7631
|
# Workaround for https://github.com/espressif/esp-idf/issues/7631
|
||||||
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
|
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
|
||||||
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=n
|
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=n
|
||||||
|
|
||||||
|
CONFIG_ESP_CONSOLE_UART=CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
use esp_idf_svc::hal::{delay::FreeRtos, gpio::{PinDriver}, prelude::Peripherals};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// It is necessary to call this function once. Otherwise some patches to the runtime
|
// It is necessary to call this function once. Otherwise some patches to the runtime
|
||||||
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
|
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
|
||||||
|
|
@ -6,5 +8,20 @@ fn main() {
|
||||||
// Bind the log crate to the ESP Logging facilities
|
// Bind the log crate to the ESP Logging facilities
|
||||||
esp_idf_svc::log::EspLogger::initialize_default();
|
esp_idf_svc::log::EspLogger::initialize_default();
|
||||||
|
|
||||||
|
let peripherals = Peripherals::take().unwrap();
|
||||||
|
let mut led_pin = PinDriver::output(peripherals.pins.gpio15).unwrap();
|
||||||
|
let mut led2_pin = PinDriver::output(peripherals.pins.gpio3).unwrap();
|
||||||
|
|
||||||
log::info!("Hello, world!");
|
log::info!("Hello, world!");
|
||||||
|
|
||||||
|
loop {
|
||||||
|
led_pin.set_low().unwrap();
|
||||||
|
led2_pin.set_low().unwrap();
|
||||||
|
FreeRtos::delay_ms(1000);
|
||||||
|
|
||||||
|
led_pin.set_high().unwrap();
|
||||||
|
led2_pin.set_high().unwrap();
|
||||||
|
FreeRtos::delay_ms(1000);
|
||||||
|
println!("blink");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue