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/rp/src/bin/pio_rotary_encoder.rs | examples/rp/src/bin/pio_rotary_encoder.rs | //! This example shows how to use the PIO module in the RP2040 to read a quadrature rotary encoder.
#![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_rp::bind_interrupts;
use embassy_rp::peripherals::PIO0;
use embassy_rp::pio::{InterruptHandler, Pio};
use embassy_rp::pio_programs::rot... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/i2c_async_embassy.rs | examples/rp/src/bin/i2c_async_embassy.rs | //! This example shows how to communicate asynchronous using i2c with external chip.
//!
//! It's using embassy's functions directly instead of traits from embedded_hal_async::i2c::I2c.
//! While most of i2c devices are addressed using 7 bits, an extension allows 10 bits too.
#![no_std]
#![no_main]
use defmt::*;
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/rp/src/bin/zerocopy.rs | examples/rp/src/bin/zerocopy.rs | //! This example shows how to use `zerocopy_channel` from `embassy_sync` for
//! sending large values between two tasks without copying.
//! The example also shows how to use the RP2040 ADC with DMA.
#![no_std]
#![no_main]
use core::sync::atomic::{AtomicU16, Ordering};
use defmt::*;
use embassy_executor::Spawner;
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/rp/src/bin/wifi_tcp_server.rs | examples/rp/src/bin/wifi_tcp_server.rs | //! This example uses the RP Pico W board Wifi chip (cyw43).
//! Connects to specified Wifi network and creates a TCP endpoint on port 1234.
#![no_std]
#![no_main]
#![allow(async_fn_in_trait)]
use core::str::from_utf8;
use cyw43::JoinOptions;
use cyw43_pio::{DEFAULT_CLOCK_DIVIDER, PioSpi};
use defmt::*;
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/rp/src/bin/usb_logger.rs | examples/rp/src/bin/usb_logger.rs | //! This example shows how to use USB (Universal Serial Bus) in the RP2040 chip.
//!
//! This creates the possibility to send log::info/warn/error/debug! to USB serial port.
#![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_rp::bind_interrupts;
use embassy_rp::peripherals::USB;
use embassy_rp::usb::{D... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/gpout.rs | examples/rp/src/bin/gpout.rs | //! This example shows how GPOUT (General purpose clock outputs) can toggle a output pin.
//!
//! The LED on the RP Pico W board is connected differently. Add a LED and resistor to another pin.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_rp::clocks;
use embassy_time::Timer;
use {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/rp/src/bin/rtc_alarm.rs | examples/rp/src/bin/rtc_alarm.rs | //! This example shows how to use RTC (Real Time Clock) for scheduling alarms and reacting to them.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_futures::select::{Either, select};
use embassy_rp::bind_interrupts;
use embassy_rp::rtc::{DateTime, DateTimeFilter, DayOfWeek, Rtc};
use e... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/shared_bus.rs | examples/rp/src/bin/shared_bus.rs | //! This example shows how to share (async) I2C and SPI buses between multiple devices.
#![no_std]
#![no_main]
use defmt::*;
use embassy_embedded_hal::shared_bus::asynch::i2c::I2cDevice;
use embassy_embedded_hal::shared_bus::asynch::spi::SpiDevice;
use embassy_executor::Spawner;
use embassy_rp::bind_interrupts;
use e... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/i2c_async.rs | examples/rp/src/bin/i2c_async.rs | //! This example shows how to communicate asynchronous using i2c with external chips.
//!
//! Example written for the [`MCP23017 16-Bit I2C I/O Expander with Serial Interface`] chip.
//! (https://www.microchip.com/en-us/product/mcp23017)
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
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/rp/src/bin/usb_raw_bulk.rs | examples/rp/src/bin/usb_raw_bulk.rs | //! Example of using USB without a pre-defined class, but instead using raw USB bulk transfers.
//!
//! Example code to send/receive data using `nusb`:
//!
//! ```ignore
//! use futures_lite::future::block_on;
//! use nusb::transfer::RequestBuffer;
//!
//! const BULK_OUT_EP: u8 = 0x01;
//! const BULK_IN_EP: u8 = 0x81;
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/uart_r503.rs | examples/rp/src/bin/uart_r503.rs | #![no_std]
#![no_main]
use defmt::{debug, error, info};
use embassy_executor::Spawner;
use embassy_rp::bind_interrupts;
use embassy_rp::peripherals::UART0;
use embassy_rp::uart::{Config, DataBits, InterruptHandler as UARTInterruptHandler, Parity, StopBits, Uart};
use embassy_time::{Duration, Timer, with_timeout};
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/rp/src/bin/ethernet_w5500_tcp_server.rs | examples/rp/src/bin/ethernet_w5500_tcp_server.rs | //! This example implements a TCP echo server on port 1234 and using DHCP.
//! Send it some data, you should see it echoed back and printed in the console.
//!
//! Example written for the [`WIZnet W5500-EVB-Pico`](https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico) board.
#![no_std]
#![no_main]
use defmt::... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/usb_hid_keyboard.rs | examples/rp/src/bin/usb_hid_keyboard.rs | #![no_std]
#![no_main]
use core::sync::atomic::{AtomicBool, AtomicU8, Ordering};
use defmt::*;
use embassy_executor::Spawner;
use embassy_futures::join::join;
use embassy_rp::bind_interrupts;
use embassy_rp::gpio::{Input, Pull};
use embassy_rp::peripherals::USB;
use embassy_rp::usb::{Driver, InterruptHandler};
use em... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/pio_stepper.rs | examples/rp/src/bin/pio_stepper.rs | //! This example shows how to use the PIO module in the RP2040 to implement a stepper motor driver
//! for a 5-wire stepper such as the 28BYJ-48. You can halt an ongoing rotation by dropping the future.
#![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_rp::bind_interrupts;
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/rp/src/bin/ethernet_w5500_multisocket.rs | examples/rp/src/bin/ethernet_w5500_multisocket.rs | //! This example shows how you can allow multiple simultaneous TCP connections, by having multiple sockets listening on the same port.
//!
//! Example written for the [`WIZnet W5500-EVB-Pico`](https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico) board.
#![no_std]
#![no_main]
use defmt::*;
use embassy_execut... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/adc.rs | examples/rp/src/bin/adc.rs | //! This example test the ADC (Analog to Digital Conversion) of the RS2040 pin 26, 27 and 28.
//! It also reads the temperature sensor in the chip.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler};
use embassy_rp::bind_interrupts;
use em... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/blinky.rs | examples/rp/src/bin/blinky.rs | //! This example test the RP Pico on board LED.
//!
//! It does not work with the RP Pico W board. See wifi_blinky.rs.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_rp::gpio;
use embassy_time::Timer;
use gpio::{Level, Output};
use {defmt_rtt as _, panic_probe as _};
#[embassy_execut... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/rp/src/bin/sharing.rs | examples/rp/src/bin/sharing.rs | //! This example shows some common strategies for sharing resources between tasks.
//!
//! We demonstrate five different ways of sharing, covering different use cases:
//! - Atomics: This method is used for simple values, such as bool and u8..u32
//! - Blocking Mutex: This is used for sharing non-async things, using Ce... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/build.rs | examples/stm32f3/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/stm32f3/src/bin/button.rs | examples/stm32f3/src/bin/button.rs | #![no_std]
#![no_main]
use cortex_m_rt::entry;
use defmt::*;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use {defmt_rtt as _, panic_probe as _};
#[entry]
fn main() -> ! {
info!("Hello World!");
let p = embassy_stm32::init(Default::default());
let button = Input::new(p.PA0, Pull::Down);... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/flash.rs | examples/stm32f3/src/bin/flash.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_stm32::flash::Flash;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_stm32::init(Default::default());
info!("Hello Flash!");
const ADDR: u32 = ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/tsc_multipin.rs | examples/stm32f3/src/bin/tsc_multipin.rs | // Example of TSC (Touch Sensing Controller) using multiple pins from the same tsc-group.
//
// What is special about using multiple TSC pins as sensor channels from the same TSC group,
// is that only one TSC pin for each TSC group can be acquired and read at the time.
// To control which channel pins are acquired and... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/tsc_blocking.rs | examples/stm32f3/src/bin/tsc_blocking.rs | // Example of blocking 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 blocking TSC interface with polling
// 3. Waiting for acquisition completion using `poll_for_acquisition`
// 4. Reading touch value... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/usb_serial.rs | examples/stm32f3/src/bin/usb_serial.rs | #![no_std]
#![no_main]
use defmt::{panic, *};
use embassy_executor::Spawner;
use embassy_futures::join::join;
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_stm32::time::mhz;
use embassy_stm32::usb::{Driver, Instance};
use embassy_stm32::{Config, bind_interrupts, peripherals, usb};
use embassy_time::Time... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/button_events.rs | examples/stm32f3/src/bin/button_events.rs | //! This example showcases channels and timing utilities of embassy.
//!
//! This example works best on STM32F3DISCOVERY board. It flashes a single LED, then if the USER
//! button is pressed the next LED is flashed (in clockwise fashion). If the USER button is double
//! clicked, then the direction changes. If the 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/stm32f3/src/bin/usart_dma.rs | examples/stm32f3/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 {
USART1 => usart::InterruptHand... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/spi_dma.rs | examples/stm32f3/src/bin/spi_dma.rs | #![no_std]
#![no_main]
use core::fmt::Write;
use core::str::from_utf8;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::spi::{Config, Spi};
use embassy_stm32::time::Hertz;
use heapless::String;
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/stm32f3/src/bin/button_exti.rs | examples/stm32f3/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{
EXTI0 => exti::InterruptHandler<interru... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/hello.rs | examples/stm32f3/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/stm32f3/src/bin/multiprio.rs | examples/stm32f3/src/bin/multiprio.rs | //! This example showcases how to create multiple Executor instances to run tasks at
//! different priority levels.
//!
//! Low priority executor runs in thread mode (not interrupt), and uses `sev` for signaling
//! there's work in the queue, and `wfe` for waiting for work.
//!
//! Medium and high priority executors ru... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f3/src/bin/blinky.rs | examples/stm32f3/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/stm32wl/build.rs | examples/stm32wl/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/stm32wl/src/bin/button.rs | examples/stm32wl/src/bin/button.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use cortex_m_rt::entry;
use defmt::*;
use embassy_stm32::SharedData;
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
use {defmt_rtt as _, panic_probe as _};
#[unsafe(link_section = ".shared_data")]
static SHARED_DATA: MaybeUninit<SharedData> = MaybeUni... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wl/src/bin/rtc.rs | examples/stm32wl/src/bin/rtc.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use chrono::{NaiveDate, NaiveDateTime};
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::rtc::{Rtc, RtcConfig};
use embassy_stm32::time::Hertz;
use embassy_stm32::{Config, SharedData};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wl/src/bin/random.rs | examples/stm32wl/src/bin/random.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::rng::{self, Rng};
use embassy_stm32::time::Hertz;
use embassy_stm32::{SharedData, bind_interrupts, peripherals};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs{
RNG => rng::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/stm32wl/src/bin/flash.rs | examples/stm32wl/src/bin/flash.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_stm32::SharedData;
use embassy_stm32::flash::Flash;
use {defmt_rtt as _, panic_probe as _};
#[unsafe(link_section = ".shared_data")]
static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::unin... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wl/src/bin/button_exti.rs | examples/stm32wl/src/bin/button_exti.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::exti::{self, ExtiInput};
use embassy_stm32::gpio::Pull;
use embassy_stm32::{SharedData, bind_interrupts, interrupt};
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/stm32wl/src/bin/uart_async.rs | examples/stm32wl/src/bin/uart_async.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::usart::{Config, InterruptHandler, Uart};
use embassy_stm32::{SharedData, bind_interrupts, peripherals};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs{
USART1 => 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/stm32wl/src/bin/adc.rs | examples/stm32wl/src/bin/adc.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::SharedData;
use embassy_stm32::adc::{Adc, CkModePclk, Clock, SampleTime};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
static SHARED_DATA: MaybeUninit<SharedData> = MaybeUninit::unin... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wl/src/bin/blinky.rs | examples/stm32wl/src/bin/blinky.rs | #![no_std]
#![no_main]
use core::mem::MaybeUninit;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::SharedData;
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[unsafe(link_section = ".shared_data")]
static SHARED_DATA: MaybeUninit<Sha... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/build.rs | examples/nrf54l15/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/nrf54l15/src/bin/gpiote_channel.rs | examples/nrf54l15/src/bin/gpiote_channel.rs | #![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_nrf::gpio::Pull;
use embassy_nrf::gpiote::{InputChannel, InputChannelPolarity};
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_nrf::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/nrf54l15/src/bin/temp.rs | examples/nrf54l15/src/bin/temp.rs | #![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_nrf::temp::Temp;
use embassy_nrf::{bind_interrupts, temp};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
TEMP => temp::InterruptHandler;
});
#[embassy_executor::main]
async fn main... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/saadc.rs | examples/nrf54l15/src/bin/saadc.rs | #![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_nrf::saadc::{ChannelConfig, Config, Saadc};
use embassy_nrf::{bind_interrupts, saadc};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
SAADC => saadc::InterruptHandler;
});
#[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/nrf54l15/src/bin/pwm.rs | examples/nrf54l15/src/bin/pwm.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_nrf::pwm::{DutyCycle, Prescaler, SimplePwm};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
// for i in range(1024): print(int((math.sin(i/512*math.pi)*0.4+0.5)**2*32767), ', ', end='')
static DUTY: [u16; 1024] = [
8... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/twim.rs | examples/nrf54l15/src/bin/twim.rs | //! Example on how to read a 24C/24LC i2c eeprom.
//!
//! Connect SDA to P0.03, SCL to P0.04
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_nrf::twim::{self, Twim};
use embassy_nrf::{bind_interrupts, peripherals};
use static_cell::ConstStaticCell;
use {defmt_rtt as _, panic_probe as _... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/rramc_buffered.rs | examples/nrf54l15/src/bin/rramc_buffered.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_nrf::rramc::{Buffered, PAGE_SIZE, Rramc};
use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_nrf... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/gpiote_port.rs | examples/nrf54l15/src/bin/gpiote_port.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_nrf::gpio::{Input, Pull};
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::task(pool_size = 4)]
async fn button_task(n: usize, mut pin: Input<'static>) {
loop {
pin.wait_for_low().await;
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/nrf54l15/src/bin/wdt.rs | examples/nrf54l15/src/bin/wdt.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_nrf::wdt::{Config, HaltConfig, Watchdog};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_nrf::init(Default::default());
info!("Hello WD... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/twis.rs | examples/nrf54l15/src/bin/twis.rs | //! TWIS example
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_nrf::twis::{self, Command, Twis};
use embassy_nrf::{bind_interrupts, peripherals};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
SERIAL20 => twis::InterruptHandler<peripherals::SERIAL20>;
});... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/uart.rs | examples/nrf54l15/src/bin/uart.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_nrf::{bind_interrupts, peripherals, uarte};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
SERIAL20 => uarte::InterruptHandler<peripherals::SERIAL20>;
});
#[embassy_executor::main]
async fn main(_spawner: Spaw... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/timer.rs | examples/nrf54l15/src/bin/timer.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::task]
async fn run1() {
loop {
info!("BIG INFREQUENT TICK");
Timer::after_secs(10).await;
}
}
#[embassy_executor::task]
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/nrf54l15/src/bin/spim.rs | examples/nrf54l15/src/bin/spim.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_nrf::{bind_interrupts, peripherals, spim};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
SERIAL00 => spim::InterruptHandler<peripherals::SERIAL00>;
});
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
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/nrf54l15/src/bin/buffered_uart.rs | examples/nrf54l15/src/bin/buffered_uart.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_nrf::buffered_uarte::{self, BufferedUarte};
use embassy_nrf::{bind_interrupts, peripherals, uarte};
use embedded_io_async::Write;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
SERIAL20 => buffered_uarte::Inter... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/rng.rs | examples/nrf54l15/src/bin/rng.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_nrf::cracen::Cracen;
use rand::Rng as _;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_nrf::init(Default::default());
let mut rng = Cracen::new_blocking(p.CRACEN);
// 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/nrf54l15/src/bin/rramc.rs | examples/nrf54l15/src/bin/rramc.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_nrf::nvmc::{Nvmc, PAGE_SIZE};
use embedded_storage::nor_flash::{NorFlash, ReadNorFlash};
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_nrf::init(Defau... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf54l15/src/bin/blinky.rs | examples/nrf54l15/src/bin/blinky.rs | #![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_nrf::gpio::{Level, Output, OutputDrive};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = embassy_nrf::init(Default::default());
let mut led =... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/wasm/src/lib.rs | examples/wasm/src/lib.rs | use embassy_executor::Spawner;
use embassy_time::Timer;
#[embassy_executor::task]
async fn ticker() {
let window = web_sys::window().expect("no global `window` exists");
let mut counter = 0;
loop {
let document = window.document().expect("should have a document on window");
let list = docu... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32u5/build.rs | examples/stm32u5/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/stm32u5/src/bin/i2c.rs | examples/stm32u5/src/bin/i2c.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_stm32::i2c::I2c;
use {defmt_rtt as _, panic_probe as _};
const HTS221_ADDRESS: u8 = 0x5F;
const WHOAMI: u8 = 0x0F;
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
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/stm32u5/src/bin/flash.rs | examples/stm32u5/src/bin/flash.rs | #![no_std]
#![no_main]
use defmt::{info, unwrap};
use embassy_executor::Spawner;
use embassy_stm32::flash::Flash;
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 Flash!")... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32u5/src/bin/usb_hs_serial.rs | examples/stm32u5/src/bin/usb_hs_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/stm32u5/src/bin/usb_serial.rs | examples/stm32u5/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/stm32u5/src/bin/ltdc.rs | examples/stm32u5/src/bin/ltdc.rs | #![no_std]
#![no_main]
#![macro_use]
#![allow(static_mut_refs)]
/// This example was derived from examples\stm32h735\src\bin\ltdc.rs
/// It demonstrates the LTDC lcd display peripheral and was tested on an STM32U5G9J-DK2 demo board (embassy-stm32 feature "stm32u5g9zj" and probe-rs chip "STM32U5G9ZJTxQ")
///
use bouncy... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32u5/src/bin/boot.rs | examples/stm32u5/src/bin/boot.rs | #![no_std]
#![no_main]
use defmt::*;
use {defmt_rtt as _, embassy_stm32 as _, panic_probe as _};
#[cortex_m_rt::entry]
fn main() -> ! {
info!("Hello World!");
loop {
//defmt::info!("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/stm32u5/src/bin/hspi_memory_mapped.rs | examples/stm32u5/src/bin/hspi_memory_mapped.rs | #![no_main]
#![no_std]
// Tested on an STM32U5G9J-DK2 demo board using the on-board MX66LM1G45G flash memory
// The flash is connected to the HSPI1 port as an OCTA-DTR device
//
// Use embassy-stm32 feature "stm32u5g9zj" and probe-rs chip "STM32U5G9ZJTxQ"
use defmt::info;
use embassy_executor::Spawner;
use embassy_st... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32u5/src/bin/tsc.rs | examples/stm32u5/src/bin/tsc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_stm32::tsc::{self, *};
use embassy_stm32::{bind_interrupts, peripherals};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
TSC => InterruptHandler<embassy_stm32::peripherals::TSC>;
});
#[cortex_m_rt::exception]
unsafe... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32u5/src/bin/rng.rs | examples/stm32u5/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/stm32u5/src/bin/adc.rs | examples/stm32u5/src/bin/adc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_stm32::adc::{self, Adc, AdcChannel, AdcConfig, SampleTime, adc4};
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: embassy_executor::Spawner) {
let config = embassy_stm32::Config::default();
let mut p = embassy_stm32::i... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32u5/src/bin/blinky.rs | examples/stm32u5/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 ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f469/build.rs | examples/stm32f469/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/stm32f469/src/bin/dsi_bsp.rs | examples/stm32f469/src/bin/dsi_bsp.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::dsihost::{DsiHost, PacketType};
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_stm32::ltdc::Ltdc;
use embassy_stm32::pac::dsihost::regs::{Ier0, Ier1};
use embassy_stm32::pac::ltdc::vals::{Bf1, Bf2, Depol, Hspol, Imr, 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/stm32c0/build.rs | examples/stm32c0/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/stm32c0/src/bin/button.rs | examples/stm32c0/src/bin/button.rs | #![no_std]
#![no_main]
use cortex_m_rt::entry;
use defmt::*;
use embassy_stm32::gpio::{Input, Pull};
use {defmt_rtt as _, panic_probe as _};
#[entry]
fn main() -> ! {
info!("Hello World!");
let p = embassy_stm32::init(Default::default());
let button = Input::new(p.PC13, Pull::Up);
loop {
if... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32c0/src/bin/rtc.rs | examples/stm32c0/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_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let 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/stm32c0/src/bin/button_exti.rs | examples/stm32c0/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{
EXTI4_15 => exti::InterruptHandler<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/stm32c0/src/bin/adc.rs | examples/stm32c0/src/bin/adc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::adc::{Adc, AdcChannel, AnyAdcChannel, Resolution, SampleTime};
use embassy_stm32::peripherals::ADC1;
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32c0/src/bin/blinky.rs | examples/stm32c0/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/stm32wba/build.rs | examples/stm32wba/build.rs | use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rerun-if-changed=link.x");
println!("cargo:rustc-link-arg-bins=--nmagic");
println!("cargo:rustc-link-arg-bins=-Tlink.x");
println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
Ok(())
}
| rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wba/src/bin/rtc.rs | examples/stm32wba/src/bin/rtc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_stm32::rcc::*;
use embassy_stm32::rtc::{DateTime, DayOfWeek, Rtc, RtcConfig};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
pub fn pll_init(config: &mut Config) {
config.rcc.pll1 = Some(em... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wba/src/bin/pwm.rs | examples/stm32wba/src/bin/pwm.rs | #![no_std]
#![no_main]
use defmt::*;
use defmt_rtt as _; // global logger
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_stm32::gpio::OutputType;
use embassy_stm32::rcc::{
AHB5Prescaler, AHBPrescaler, APBPrescaler, PllDiv, PllMul, PllPreDiv, PllSource, Sysclk, VoltageScale,
};
use embassy_st... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wba/src/bin/mac_ffd.rs | examples/stm32wba/src/bin/mac_ffd.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_stm32::rcc::{Sysclk, mux};
use embassy_stm32_wpan::bindings::mac::{ST_MAC_callbacks_t, ST_MAC_init};
use {defmt_rtt as _, panic_probe as _};
static _MAC_CALLBACKS: ST_MAC_callbacks_t = ST_MAC_callbacks_t {
m... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32wba/src/bin/button_exti.rs | examples/stm32wba/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{
EXTI13 => exti::InterruptHandler<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/stm32wba/src/bin/adc.rs | examples/stm32wba/src/bin/adc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_stm32::adc::{Adc, AdcChannel, SampleTime, adc4};
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: embassy_executor::Spawner) {
let config = embassy_stm32::Config::default();
let mut p = embassy_stm32::init(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/stm32wba/src/bin/blinky.rs | examples/stm32wba/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/stm32g4/build.rs | examples/stm32g4/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/stm32g4/src/bin/button.rs | examples/stm32g4/src/bin/button.rs | #![no_std]
#![no_main]
use cortex_m_rt::entry;
use defmt::*;
use embassy_stm32::gpio::{Input, Pull};
use {defmt_rtt as _, panic_probe as _};
#[entry]
fn main() -> ! {
info!("Hello World!");
let p = embassy_stm32::init(Default::default());
let button = Input::new(p.PC13, Pull::Down);
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/stm32g4/src/bin/adc_differential.rs | examples/stm32g4/src/bin/adc_differential.rs | //! adc differential mode example
//!
//! This example uses adc1 in differential mode
//! p:pa0 n:pa1
#![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_ex... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/usb_c_pd.rs | examples/stm32g4/src/bin/usb_c_pd.rs | #![no_std]
#![no_main]
use defmt::{Format, error, info};
use embassy_executor::Spawner;
use embassy_stm32::ucpd::{self, CcPhy, CcPull, CcSel, CcVState, Ucpd};
use embassy_stm32::{Config, bind_interrupts, peripherals};
use embassy_time::{Duration, with_timeout};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/i2c_slave.rs | examples/stm32g4/src/bin/i2c_slave.rs | //! This example shows how to use an stm32 as both a master and a slave.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::i2c::{Address, OwnAddresses, SlaveCommandKind};
use embassy_stm32::mode::Async;
use embassy_stm32::time::Hertz;
use embassy_stm32::{bind_interrupts, i2c, perip... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/usb_serial.rs | examples/stm32g4/src/bin/usb_serial.rs | #![no_std]
#![no_main]
use defmt::{panic, *};
use embassy_executor::Spawner;
use embassy_futures::join::join;
use embassy_stm32::time::Hertz;
use embassy_stm32::usb::{self, Driver, Instance};
use embassy_stm32::{Config, bind_interrupts, peripherals};
use embassy_usb::Builder;
use embassy_usb::class::cdc_acm::{CdcAcmCl... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/adc_dma.rs | examples/stm32g4/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 as _, SampleTime};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
static mut DMA_BUF: [u16; 2] = [0; 2];
#[embassy_executor::main]
async fn main(_spawner: Spawner)... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/pwm.rs | examples/stm32g4/src/bin/pwm.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::gpio::OutputType;
use embassy_stm32::time::khz;
use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/can.rs | examples/stm32g4/src/bin/can.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::peripherals::*;
use embassy_stm32::time::Hertz;
use embassy_stm32::{Config, bind_interrupts, can};
use embassy_time::Timer;
use static_cell::StaticCell;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
FDCA... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/button_exti.rs | examples/stm32g4/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/stm32g4/src/bin/adc_oversampling.rs | examples/stm32g4/src/bin/adc_oversampling.rs | //! adc oversampling example
//!
//! This example uses adc oversampling to achieve 16bit data
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_stm32::adc::vals::{Rovsm, Trovs};
use embassy_stm32::adc::{Adc, AdcConfig, SampleTime};
use embassy_time::Timer;
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/stm32g4/src/bin/adc_injected_and_regular.rs | examples/stm32g4/src/bin/adc_injected_and_regular.rs | //! adc injected and regular conversions
//!
//! This example both regular and injected ADC conversions at the same time
//! p:pa0 n:pa2
#![no_std]
#![no_main]
use core::cell::RefCell;
use defmt::info;
use embassy_stm32::adc::{
Adc, AdcChannel as _, ConversionTrigger, Exten, InjectedAdc, RegularConversionMode, S... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g4/src/bin/adc.rs | examples/stm32g4/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/stm32g4/src/bin/blinky.rs | examples/stm32g4/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/stm32g4/src/bin/pll.rs | examples/stm32g4/src/bin/pll.rs | #![no_std]
#![no_main]
use defmt::*;
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 mut config = Config::default();
{
use embassy_stm32::rcc::*;
config.r... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.