repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/dts.rs
examples/stm32h5/src/bin/dts.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::dts::{Dts, InterruptHandler, SampleTime}; use embassy_stm32::peripherals::DTS; use embassy_stm32::rcc::frequency; use embassy_stm32::{Config, bind_interrupts, dts}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; b...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/backup_sram.rs
examples/stm32h5/src/bin/backup_sram.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::Config; use embassy_stm32::backup_sram::BackupMemory; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut config = Config::default(); config....
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/sai.rs
examples/stm32h5/src/bin/sai.rs
#![no_std] #![no_main] use defmt::info; use embassy_executor::Spawner; use embassy_stm32::{Config, sai}; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello world."); let mut config = Config::default(); { use embassy_stm32::rcc::*; ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/mco.rs
examples/stm32h5/src/bin/mco.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::Speed; use embassy_stm32::rcc::{Mco, Mco2Source, McoConfig}; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); /* De...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/sdmmc.rs
examples/stm32h5/src/bin/sdmmc.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; use embassy_stm32::sdmmc::Sdmmc; use embassy_stm32::sdmmc::sd::CmdBlock; use embassy_stm32::sdmmc::sdio::SerialDataInterface; use embassy_stm32::time::mhz; use embassy_stm32::{Config, bind_...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/rng.rs
examples/stm32h5/src/bin/rng.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::rng::Rng; use embassy_stm32::{bind_interrupts, peripherals, rng}; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!(struct Irqs { RNG => rng::InterruptHandler<peripherals::RNG>; }); #[embassy_executor::main] async fn ma...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/adc.rs
examples/stm32h5/src/bin/adc.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::Config; use embassy_stm32::adc::{Adc, SampleTime}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut config = Config::default(); { ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/stop.rs
examples/stm32h5/src/bin/stop.rs
// Notice: // the MCU might need an extra reset to make the code actually running #![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{AnyPin, Level, Output, Speed}; use embassy_stm32::rcc::{HSIPrescaler, LsConfig}; use embassy_stm32::{Config, Peri, low_power}; use embassy_tim...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h5/src/bin/blinky.rs
examples/stm32h5/src/bin/blinky.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); info!("Hello World...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/build.rs
examples/stm32l4/build.rs
fn main() { println!("cargo:rustc-link-arg-bins=--nmagic"); println!("cargo:rustc-link-arg-bins=-Tlink.x"); println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); }
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/button.rs
examples/stm32l4/src/bin/button.rs
#![no_std] #![no_main] use defmt::*; use embassy_stm32::gpio::{Input, Pull}; use {defmt_rtt as _, panic_probe as _}; #[cortex_m_rt::entry] fn main() -> ! { info!("Hello World!"); let p = embassy_stm32::init(Default::default()); let button = Input::new(p.PC13, Pull::Up); loop { if button.is_...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/rtc.rs
examples/stm32l4/src/bin/rtc.rs
#![no_std] #![no_main] use chrono::{NaiveDate, NaiveDateTime}; use defmt::*; use embassy_executor::Spawner; use embassy_stm32::Config; use embassy_stm32::rtc::{Rtc, RtcConfig}; use embassy_stm32::time::Hertz; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spa...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/i2c.rs
examples/stm32l4/src/bin/i2c.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::i2c::I2c; use {defmt_rtt as _, panic_probe as _}; const ADDRESS: u8 = 0x5F; const WHOAMI: u8 = 0x0F; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); let mut i2c...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/tsc_multipin.rs
examples/stm32l4/src/bin/tsc_multipin.rs
// # Example of TSC (Touch Sensing Controller) using multiple pins from the same TSC group // // This example demonstrates how to use the Touch Sensing Controller (TSC) with multiple pins, including pins from the same TSC group, on an STM32L4R5ZI-P board. // // ## Key Concepts // // - Only one TSC pin for each TSC grou...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/tsc_blocking.rs
examples/stm32l4/src/bin/tsc_blocking.rs
// # Example of blocking TSC (Touch Sensing Controller) that lights an LED when touch is detected // // This example demonstrates how to use the Touch Sensing Controller (TSC) in blocking mode on an STM32L4R5ZI-P board. // // ## This example demonstrates: // // 1. Configuring a single TSC channel pin // 2. Using the bl...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/i2c_blocking_async.rs
examples/stm32l4/src/bin/i2c_blocking_async.rs
#![no_std] #![no_main] use defmt::*; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::i2c::I2c; use embedded_hal_async::i2c::I2c as I2cTrait; use {defmt_rtt as _, panic_probe as _}; const ADDRESS: u8 = 0x5F; const WHOAMI: u8 = 0x0F; #[embassy_executor::main] async f...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/i2c_dma.rs
examples/stm32l4/src/bin/i2c_dma.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::i2c::I2c; use embassy_stm32::{bind_interrupts, i2c, peripherals}; use {defmt_rtt as _, panic_probe as _}; const ADDRESS: u8 = 0x5F; const WHOAMI: u8 = 0x0F; bind_interrupts!(struct Irqs { I2C2_EV => i2c::EventInterruptHandler<...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/usb_serial.rs
examples/stm32l4/src/bin/usb_serial.rs
#![no_std] #![no_main] use defmt::{panic, *}; use defmt_rtt as _; // global logger use embassy_executor::Spawner; use embassy_futures::join::join; use embassy_stm32::usb::{Driver, Instance}; use embassy_stm32::{Config, bind_interrupts, peripherals, usb}; use embassy_usb::Builder; use embassy_usb::class::cdc_acm::{CdcA...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/adc_dma.rs
examples/stm32l4/src/bin/adc_dma.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::Config; use embassy_stm32::adc::{Adc, AdcChannel, RegularConversionMode, SampleTime}; use {defmt_rtt as _, panic_probe as _}; const DMA_BUF_LEN: usize = 512; #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/usart.rs
examples/stm32l4/src/bin/usart.rs
#![no_std] #![no_main] use defmt::*; use embassy_stm32::usart::{Config, Uart}; use embassy_stm32::{bind_interrupts, peripherals, usart}; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!(struct Irqs { UART4 => usart::InterruptHandler<peripherals::UART4>; }); #[cortex_m_rt::entry] fn main() -> ! { info...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/usart_dma.rs
examples/stm32l4/src/bin/usart_dma.rs
#![no_std] #![no_main] use core::fmt::Write; use defmt::*; use embassy_executor::Spawner; use embassy_stm32::usart::{Config, Uart}; use embassy_stm32::{bind_interrupts, peripherals, usart}; use heapless::String; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!(struct Irqs { UART4 => usart::InterruptHandl...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/spi_dma.rs
examples/stm32l4/src/bin/spi_dma.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; use embassy_stm32::spi::{Config, Spi}; use embassy_stm32::time::Hertz; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = emba...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/dac.rs
examples/stm32l4/src/bin/dac.rs
#![no_std] #![no_main] use defmt::*; use embassy_stm32::dac::{DacCh1, Value}; use {defmt_rtt as _, panic_probe as _}; #[cortex_m_rt::entry] fn main() -> ! { let p = embassy_stm32::init(Default::default()); info!("Hello World!"); let mut dac = DacCh1::new_blocking(p.DAC1, p.PA4); loop { for v...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/can.rs
examples/stm32l4/src/bin/can.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::can::filter::Mask32; use embassy_stm32::can::{ Can, Fifo, Frame, Rx0InterruptHandler, Rx1InterruptHandler, SceInterruptHandler, TxInterruptHandler, }; use embassy_stm32::peripherals::CAN1; use embassy_stm32::{Config, bind_interr...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/spe_adin1110_http_server.rs
examples/stm32l4/src/bin/spe_adin1110_http_server.rs
#![no_main] #![no_std] #![deny(clippy::pedantic)] #![allow(clippy::doc_markdown)] #![allow(clippy::missing_errors_doc)] // This example works on a ANALOG DEVICE EVAL-ADIN110EBZ board. // Settings switch S201 "HW CFG": // - Without SPI CRC: OFF-ON-OFF-OFF-OFF // - With SPI CRC: ON -ON-OFF-OFF-OFF // Settings switc...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/button_exti.rs
examples/stm32l4/src/bin/button_exti.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::gpio::Pull; use embassy_stm32::{bind_interrupts, interrupt}; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!( pub struct Irqs{ EXTI15_10 => exti::InterruptHandler<int...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/spi.rs
examples/stm32l4/src/bin/spi.rs
#![no_std] #![no_main] use defmt::*; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_stm32::spi::{Config, Spi}; use embassy_stm32::time::Hertz; use {defmt_rtt as _, panic_probe as _}; #[cortex_m_rt::entry] fn main() -> ! { info!("Hello World!"); let p = embassy_stm32::init(Default::default()); ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/spi_blocking_async.rs
examples/stm32l4/src/bin/spi_blocking_async.rs
#![no_std] #![no_main] use defmt::*; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; use embassy_stm32::spi::{Config, Spi}; use embassy_stm32::time::Hertz; use embedded_hal_async::spi::SpiBus; use {defmt_rtt as _, panic_prob...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/dac_dma.rs
examples/stm32l4/src/bin/dac_dma.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::Peri; use embassy_stm32::dac::{DacCh1, DacCh2, ValueArray}; use embassy_stm32::mode::Async; use embassy_stm32::pac::timer::vals::Mms; use embassy_stm32::peripherals::{DAC1, TIM6, TIM7}; use embassy_stm32::rcc::frequency; use embassy...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/mco.rs
examples/stm32l4/src/bin/mco.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_stm32::rcc::{Mco, McoConfig, McoPrescaler, McoSource}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/tsc_async.rs
examples/stm32l4/src/bin/tsc_async.rs
// Example of async TSC (Touch Sensing Controller) that lights an LED when touch is detected. // // This example demonstrates: // 1. Configuring a single TSC channel pin // 2. Using the async TSC interface // 3. Waiting for acquisition completion using `pend_for_acquisition` // 4. Reading touch values and controlling a...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/rng.rs
examples/stm32l4/src/bin/rng.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::rcc::{Pll, PllMul, PllPreDiv, PllQDiv, PllRDiv, PllSource, Sysclk}; use embassy_stm32::rng::Rng; use embassy_stm32::{Config, bind_interrupts, peripherals, rng}; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!(struct Irqs {...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/adc.rs
examples/stm32l4/src/bin/adc.rs
#![no_std] #![no_main] use defmt::*; use embassy_stm32::Config; use embassy_stm32::adc::{Adc, AdcConfig, Resolution, SampleTime}; use {defmt_rtt as _, panic_probe as _}; #[cortex_m_rt::entry] fn main() -> ! { info!("Hello World!"); let mut config = Config::default(); { use embassy_stm32::rcc::*; ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32l4/src/bin/blinky.rs
examples/stm32l4/src/bin/blinky.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); info!("Hello World...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32n6/build.rs
examples/stm32n6/build.rs
fn main() { println!("cargo:rustc-link-arg-bins=--nmagic"); println!("cargo:rustc-link-arg-bins=-Tlink.x"); println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); }
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32n6/src/bin/crc.rs
examples/stm32n6/src/bin/crc.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::crc::{Config, Crc, InputReverseConfig, PolySize}; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); info!("Hello World!"); ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32n6/src/bin/hash.rs
examples/stm32n6/src/bin/hash.rs
#![no_std] #![no_main] use defmt::info; use embassy_executor::Spawner; use embassy_stm32::hash::*; use embassy_stm32::{Config, bind_interrupts, hash, peripherals}; use embassy_time::Instant; use hmac::{Hmac, Mac}; use sha2::{Digest, Sha256}; use {defmt_rtt as _, panic_probe as _}; type HmacSha256 = Hmac<Sha256>; bin...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32n6/src/bin/blinky.rs
examples/stm32n6/src/bin/blinky.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::gpio::{Level, Output, Pull, Speed}; use embassy_stm32::{bind_interrupts, interrupt}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!( pub struct Irqs...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wl55cm0/build.rs
examples/stm32wl55cm0/build.rs
fn main() { println!("cargo:rustc-link-arg-bins=--nmagic"); println!("cargo:rustc-link-arg-bins=-Tlink.x"); println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); }
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wl55cm0/src/bin/intercore.rs
examples/stm32wl55cm0/src/bin/intercore.rs
#![no_std] #![no_main] use core::mem::MaybeUninit; use core::sync::atomic::{AtomicBool, Ordering}; use defmt::*; #[cfg(feature = "defmt-rtt")] use defmt_rtt as _; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_stm32::ipcc::{Config as IPCCConfig, InterruptHandler, Ipcc}; us...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/serial_port.rs
examples/std/src/serial_port.rs
use std::io; use std::os::unix::io::{AsRawFd, RawFd}; use nix::errno::Errno; use nix::fcntl::OFlag; use nix::sys::termios; pub struct SerialPort { fd: RawFd, } impl SerialPort { pub fn new<P: ?Sized + nix::NixPath>(path: &P, baudrate: termios::BaudRate) -> io::Result<Self> { let fd = nix::fcntl::open...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/net_dns.rs
examples/std/src/bin/net_dns.rs
use clap::Parser; use embassy_executor::{Executor, Spawner}; use embassy_net::dns::DnsQueryType; use embassy_net::{Config, Ipv4Address, Ipv4Cidr, StackResources}; use embassy_net_tuntap::TunTapDevice; use heapless::Vec; use log::*; use rand_core::{OsRng, TryRngCore}; use static_cell::StaticCell; #[derive(Parser)] #[cl...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/serial.rs
examples/std/src/bin/serial.rs
#[path = "../serial_port.rs"] mod serial_port; use async_io::Async; use embassy_executor::Executor; use embassy_time as _; use embedded_io_async::Read; use log::*; use nix::sys::termios; use static_cell::StaticCell; use self::serial_port::SerialPort; #[embassy_executor::task] async fn run() { // Open the serial ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/net_udp.rs
examples/std/src/bin/net_udp.rs
use clap::Parser; use embassy_executor::{Executor, Spawner}; use embassy_net::udp::{PacketMetadata, UdpSocket}; use embassy_net::{Config, Ipv4Address, Ipv4Cidr, StackResources}; use embassy_net_tuntap::TunTapDevice; use heapless::Vec; use log::*; use rand_core::{OsRng, TryRngCore}; use static_cell::StaticCell; #[deriv...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/net_ppp.rs
examples/std/src/bin/net_ppp.rs
//! Testing against pppd: //! //! echo myuser $(hostname) mypass 192.168.7.10 >> /etc/ppp/pap-secrets //! socat -v -x PTY,link=pty1,rawer PTY,link=pty2,rawer //! sudo pppd $PWD/pty1 115200 192.168.7.1: ms-dns 8.8.4.4 ms-dns 8.8.8.8 nodetach debug local persist silent noproxyarp //! RUST_LOG=trace cargo ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/tick_cancel.rs
examples/std/src/bin/tick_cancel.rs
use std::sync::atomic::{AtomicBool, Ordering}; use std::thread; use std::time::Duration; use embassy_executor::Executor; use embassy_time::Timer; use log::*; use static_cell::StaticCell; #[embassy_executor::task] async fn run() { loop { info!("tick"); Timer::after_secs(1).await; } } static DO...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/tick.rs
examples/std/src/bin/tick.rs
use embassy_executor::Spawner; use embassy_time::Timer; use log::*; #[embassy_executor::task] async fn run() { loop { info!("tick"); Timer::after_secs(1).await; } } #[embassy_executor::main] async fn main(spawner: Spawner) { env_logger::builder() .filter_level(log::LevelFilter::Deb...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/net.rs
examples/std/src/bin/net.rs
use core::fmt::Write as _; use clap::Parser; use embassy_executor::{Executor, Spawner}; use embassy_net::tcp::TcpSocket; use embassy_net::{Config, Ipv4Address, Ipv4Cidr, StackResources}; use embassy_net_tuntap::TunTapDevice; use embassy_time::Duration; use embedded_io_async::Write; use heapless::Vec; use log::*; use r...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/std/src/bin/tcp_accept.rs
examples/std/src/bin/tcp_accept.rs
use clap::Parser; use embassy_executor::{Executor, Spawner}; use embassy_net::tcp::TcpSocket; use embassy_net::{Config, Ipv4Address, Ipv4Cidr, StackResources}; use embassy_net_tuntap::TunTapDevice; use embassy_time::{Duration, Timer}; use embedded_io_async::Write as _; use heapless::Vec; use log::*; use rand_core::{OsR...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f334/build.rs
examples/stm32f334/build.rs
fn main() { println!("cargo:rustc-link-arg-bins=--nmagic"); println!("cargo:rustc-link-arg-bins=-Tlink.x"); println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); }
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f334/src/bin/button.rs
examples/stm32f334/src/bin/button.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { info!("Hello World!"); let p = embassy_stm32::init(Default::defaul...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f334/src/bin/opamp.rs
examples/stm32f334/src/bin/opamp.rs
#![no_std] #![no_main] use defmt::info; use embassy_executor::Spawner; use embassy_stm32::adc::{Adc, SampleTime}; use embassy_stm32::opamp::OpAmp; use embassy_stm32::peripherals::ADC2; use embassy_stm32::time::mhz; use embassy_stm32::{Config, adc, bind_interrupts}; use embassy_time::Timer; use {defmt_rtt as _, panic_p...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f334/src/bin/pwm.rs
examples/stm32f334/src/bin/pwm.rs
#![no_std] #![no_main] use defmt::*; use embassy_executor::Spawner; use embassy_stm32::Config; use embassy_stm32::hrtim::*; use embassy_stm32::time::{khz, mhz}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) { let mut config = Config::de...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f334/src/bin/hello.rs
examples/stm32f334/src/bin/hello.rs
#![no_std] #![no_main] use defmt::info; use embassy_executor::Spawner; use embassy_stm32::Config; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; #[embassy_executor::main] async fn main(_spawner: Spawner) -> ! { let config = Config::default(); let _p = embassy_stm32::init(config); loop {...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f334/src/bin/adc.rs
examples/stm32f334/src/bin/adc.rs
#![no_std] #![no_main] use defmt::info; use embassy_executor::Spawner; use embassy_stm32::adc::{Adc, SampleTime}; use embassy_stm32::peripherals::ADC1; use embassy_stm32::time::mhz; use embassy_stm32::{Config, adc, bind_interrupts}; use embassy_time::Timer; use {defmt_rtt as _, panic_probe as _}; bind_interrupts!(str...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h742/build.rs
examples/stm32h742/build.rs
fn main() { println!("cargo:rustc-link-arg-bins=--nmagic"); println!("cargo:rustc-link-arg-bins=-Tlink.x"); println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); }
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h742/src/bin/qspi.rs
examples/stm32h742/src/bin/qspi.rs
#![no_std] #![no_main] #![allow(dead_code)] // Allow dead code as not all commands are used in the example use defmt::info; use embassy_executor::Spawner; use embassy_stm32::Config as StmCfg; use embassy_stm32::mode::Blocking; use embassy_stm32::qspi::enums::{AddressSize, ChipSelectHighTime, FIFOThresholdLevel, Memory...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32wb-dfu/build.rs
examples/boot/bootloader/stm32wb-dfu/build.rs
use std::env; use std::fs::File; use std::io::Write; use std::path::PathBuf; fn main() { // Put `memory.x` in our output directory and ensure it's // on the linker search path. let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); File::create(out.join("memory.x")) .unwrap() .write...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32wb-dfu/src/main.rs
examples/boot/bootloader/stm32wb-dfu/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; use cortex_m_rt::{entry, exception}; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_stm32::*; use embassy_stm32::flash::{BANK1_REGION, Flash, WRITE_SIZE}; use embassy_stm32::rcc::WPAN_DEFAULT; use embassy_stm32::usb::Driver; use embassy_stm32::{bind_inte...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/rp/build.rs
examples/boot/bootloader/rp/build.rs
use std::env; use std::fs::File; use std::io::Write; use std::path::PathBuf; fn main() { // Put `memory.x` in our output directory and ensure it's // on the linker search path. let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); File::create(out.join("memory.x")) .unwrap() .write...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/rp/src/main.rs
examples/boot/bootloader/rp/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; use cortex_m_rt::{entry, exception}; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_rp::*; use embassy_sync::blocking_mutex::Mutex; use embassy_time::Duration; const FLASH_SIZE: usize = 2 * 1024 * 1024; #[entry] fn main() -> ! { let p = embassy_rp:...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32-dual-bank/build.rs
examples/boot/bootloader/stm32-dual-bank/build.rs
use std::env; use std::fs::File; use std::io::Write; use std::path::PathBuf; fn main() { // Put `memory.x` in our output directory and ensure it's // on the linker search path. let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); File::create(out.join("memory.x")) .unwrap() .write...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32-dual-bank/src/main.rs
examples/boot/bootloader/stm32-dual-bank/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; use cortex_m_rt::{entry, exception}; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_stm32::*; use embassy_stm32::flash::{BANK1_REGION, Flash}; use embassy_sync::blocking_mutex::Mutex; #[entry] fn main() -> ! { let p = embassy_stm32::init(Default::de...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/nrf/build.rs
examples/boot/bootloader/nrf/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/nrf/src/main.rs
examples/boot/bootloader/nrf/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; use cortex_m_rt::{entry, exception}; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_nrf::*; use embassy_nrf::nvmc::Nvmc; use embassy_nrf::wdt::{self, HaltConfig, SleepConfig}; use embassy_sync::blocking_mutex::Mutex; #[entry] fn main() -> ! { let p ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32wba-dfu/build.rs
examples/boot/bootloader/stm32wba-dfu/build.rs
use std::env; use std::fs::File; use std::io::Write; use std::path::PathBuf; fn main() { // Put `memory.x` in our output directory and ensure it's // on the linker search path. let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); File::create(out.join("memory.x")) .unwrap() .write...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32wba-dfu/src/main.rs
examples/boot/bootloader/stm32wba-dfu/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; use cortex_m_rt::{entry, exception}; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_stm32::*; use embassy_stm32::flash::{BANK1_REGION, Flash, WRITE_SIZE}; use embassy_stm32::usb::Driver; use embassy_stm32::{Config, bind_interrupts, peripherals, usb}; use...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32/build.rs
examples/boot/bootloader/stm32/build.rs
use std::env; use std::fs::File; use std::io::Write; use std::path::PathBuf; fn main() { // Put `memory.x` in our output directory and ensure it's // on the linker search path. let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); File::create(out.join("memory.x")) .unwrap() .write...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/bootloader/stm32/src/main.rs
examples/boot/bootloader/stm32/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; use cortex_m_rt::{entry, exception}; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_stm32::*; use embassy_stm32::flash::{BANK1_REGION, Flash}; use embassy_sync::blocking_mutex::Mutex; #[entry] fn main() -> ! { let p = embassy_stm32::init(Default::de...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l0/build.rs
examples/boot/application/stm32l0/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l0/src/bin/b.rs
examples/boot/application/stm32l0/src/bin/b.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); let mu...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l0/src/bin/a.rs
examples/boot/application/stm32l0/src/bin/a.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::flash::{Flash, WRITE_SIZE};...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32h7/build.rs
examples/boot/application/stm32h7/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32h7/src/bin/b.rs
examples/boot/application/stm32h7/src/bin/b.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); Timer:...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32h7/src/bin/a.rs
examples/boot/application/stm32h7/src/bin/a.rs
#![no_std] #![no_main] use core::cell::RefCell; #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterConfig}; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::flash::{Flash, WRITE_SIZE}; use embassy_stm...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wb-dfu/build.rs
examples/boot/application/stm32wb-dfu/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wb-dfu/src/main.rs
examples/boot/application/stm32wb-dfu/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareState, FirmwareUpdaterConfig}; use embassy_executor::Spawner; use embassy_stm32::flash::{Flash, WRITE_SIZE}; use embassy_stm32::rcc::WPAN_DEFAULT; use embassy_stm32::usb:...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l1/build.rs
examples/boot/application/stm32l1/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l1/src/bin/b.rs
examples/boot/application/stm32l1/src/bin/b.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); let mu...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l1/src/bin/a.rs
examples/boot/application/stm32l1/src/bin/a.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::flash::{Flash, WRITE_SIZE};...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/rp/build.rs
examples/boot/application/rp/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/rp/src/bin/b.rs
examples/boot/application/rp/src/bin/b.rs
#![no_std] #![no_main] use embassy_executor::Spawner; use embassy_rp::gpio; use embassy_time::Timer; use gpio::{Level, Output}; use {defmt_rtt as _, panic_reset as _}; #[embassy_executor::main] async fn main(_s: Spawner) { let p = embassy_rp::init(Default::default()); let mut led = Output::new(p.PIN_25, Level...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/rp/src/bin/a.rs
examples/boot/application/rp/src/bin/a.rs
#![no_std] #![no_main] use core::cell::RefCell; use defmt_rtt as _; use embassy_boot_rp::*; use embassy_executor::Spawner; use embassy_rp::flash::Flash; use embassy_rp::gpio::{Level, Output}; use embassy_rp::watchdog::Watchdog; use embassy_sync::blocking_mutex::Mutex; use embassy_time::{Duration, Timer}; use embedded...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32f3/build.rs
examples/boot/application/stm32f3/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32f3/src/bin/b.rs
examples/boot/application/stm32f3/src/bin/b.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); let mu...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32f3/src/bin/a.rs
examples/boot/application/stm32f3/src/bin/a.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::flash::{Flash, WRITE_SIZE};...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wl/build.rs
examples/boot/application/stm32wl/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wl/src/bin/b.rs
examples/boot/application/stm32wl/src/bin/b.rs
#![no_std] #![no_main] use core::mem::MaybeUninit; #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::SharedData; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[unsafe(link_section = ".shared_data")] static SHARED_DATA: May...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wl/src/bin/a.rs
examples/boot/application/stm32wl/src/bin/a.rs
#![no_std] #![no_main] use core::mem::MaybeUninit; #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l4/build.rs
examples/boot/application/stm32l4/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l4/src/bin/b.rs
examples/boot/application/stm32l4/src/bin/b.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); let mu...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32l4/src/bin/a.rs
examples/boot/application/stm32l4/src/bin/a.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, FirmwareUpdater, FirmwareUpdaterConfig}; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::flash::{Flash, WRITE_SIZE};...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/nrf/build.rs
examples/boot/application/nrf/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/nrf/src/bin/b.rs
examples/boot/application/nrf/src/bin/b.rs
#![no_std] #![no_main] #![macro_use] use embassy_executor::Spawner; use embassy_nrf::gpio::{Level, Output, OutputDrive}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_nrf::init(Default::default()); #[cfg(not(feature = "nrf54"))] ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/nrf/src/bin/a.rs
examples/boot/application/nrf/src/bin/a.rs
#![no_std] #![no_main] #![macro_use] #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot::State; use embassy_boot_nrf::{FirmwareUpdater, FirmwareUpdaterConfig}; use embassy_embedded_hal::adapter::BlockingAsync; use embassy_executor::Spawner; use embassy_nrf::gpio::{Input, Level, Output, OutputDrive, Pull}; ...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wba-dfu/build.rs
examples/boot/application/stm32wba-dfu/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32wba-dfu/src/main.rs
examples/boot/application/stm32wba-dfu/src/main.rs
#![no_std] #![no_main] use core::cell::RefCell; #[cfg(feature = "defmt")] use defmt_rtt as _; use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareState, FirmwareUpdaterConfig}; use embassy_executor::Spawner; use embassy_stm32::flash::{Flash, WRITE_SIZE}; use embassy_stm32::usb::{self, Driver}; use embassy_stm32::...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32f7/build.rs
examples/boot/application/stm32f7/build.rs
//! This build script copies the `memory.x` file from the crate root into //! a directory where the linker can always find it at build time. //! For many projects this is optional, as the linker always searches the //! project root directory -- wherever `Cargo.toml` is. However, if you //! are using a workspace or have...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32f7/src/bin/b.rs
examples/boot/application/stm32f7/src/bin/b.rs
#![no_std] #![no_main] #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_executor::Spawner; use embassy_stm32::gpio::{Level, Output, Speed}; use embassy_time::Timer; use panic_reset as _; #[embassy_executor::main] async fn main(_spawner: Spawner) { let p = embassy_stm32::init(Default::default()); Timer:...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false
embassy-rs/embassy
https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/boot/application/stm32f7/src/bin/a.rs
examples/boot/application/stm32f7/src/bin/a.rs
#![no_std] #![no_main] use core::cell::RefCell; #[cfg(feature = "defmt")] use defmt_rtt::*; use embassy_boot_stm32::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterConfig}; use embassy_executor::Spawner; use embassy_stm32::exti::{self, ExtiInput}; use embassy_stm32::flash::{Flash, WRITE_SIZE}; use embassy_stm...
rust
Apache-2.0
f242d794e3325bc9b3559e50d2ea7fc293e1d574
2026-01-04T15:48:40.485023Z
false