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/stm32g0/src/bin/spi_neopixel.rs | examples/stm32g0/src/bin/spi_neopixel.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::dma::word::U5;
use embassy_stm32::spi::{Config, Spi};
use embassy_stm32::time::Hertz;
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
const NR_PIXELS: usize = 15;
const BITS_PER_PIXEL: usize = 24; // 24 for rgb, 32... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/usb_serial.rs | examples/stm32g0/src/bin/usb_serial.rs | #![no_std]
#![no_main]
use defmt::{panic, *};
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::{CdcAcmClass, State};
use embassy_usb::dri... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/adc_dma.rs | examples/stm32g0/src/bin/adc_dma.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::adc::{Adc, AdcChannel as _, Clock, Presc, 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) {
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/stm32g0/src/bin/pwm_input.rs | examples/stm32g0/src/bin/pwm_input.rs | //! PWM input example
//!
//! This program demonstrates how to capture the parameters of the input waveform (frequency, width and duty cycle)
//! Connect PB1 and PA6 with a 1k Ohm resistor or Connect PB1 and PA8 with a 1k Ohm resistor
//! to see the output.
//!
#![no_std]
#![no_main]
use defmt::*;
use embassy_executo... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/usart.rs | examples/stm32g0/src/bin/usart.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_stm32::usart::{Config, Uart};
use {defmt_rtt as _, panic_probe as _};
#[cortex_m_rt::entry]
fn main() -> ! {
info!("Hello World!");
let p = embassy_stm32::init(Default::default());
let config = Config::default();
let mut usart = Uart::new_blocking(p.U... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/usart_dma.rs | examples/stm32g0/src/bin/usart_dma.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::usart::{Config, Uart};
use embassy_stm32::{bind_interrupts, peripherals, usart};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
USART1 => usart::InterruptHandler<peripherals::USART1>;
});
#[embassy_exec... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/onewire_ds18b20.rs | examples/stm32g0/src/bin/onewire_ds18b20.rs | //! This examples shows how you can use buffered or DMA UART to read a DS18B20 temperature sensor on 1-Wire bus.
//! Connect 5k pull-up resistor between PA9 and 3.3V.
#![no_std]
#![no_main]
use cortex_m::singleton;
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::mode::Async;
use embassy_stm32::usart::{... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/button_exti.rs | examples/stm32g0/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/stm32g0/src/bin/adc_oversampling.rs | examples/stm32g0/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::adc::{Adc, AdcConfig, Clock, Ovsr, Ovss, Presc, SampleTime};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[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/stm32g0/src/bin/pwm_complementary.rs | examples/stm32g0/src/bin/pwm_complementary.rs | //! PWM complementary example
//!
//! This example uses two complementary pwm outputs from TIM1 with different duty cycles
//! ___ ___
//! |_________| |_________| PA8
//! _________ _________
//! ___| |___| | PA7
//! _________ _________
//! |___| ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/hf_timer.rs | examples/stm32g0/src/bin/hf_timer.rs | #![no_std]
#![no_main]
use defmt::info;
use embassy_executor::Spawner;
use embassy_stm32::Config as PeripheralConfig;
use embassy_stm32::gpio::OutputType;
use embassy_stm32::time::khz;
use embassy_stm32::timer::Channel;
use embassy_stm32::timer::complementary_pwm::{ComplementaryPwm, ComplementaryPwmPin};
use embassy_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/stm32g0/src/bin/usart_buffered.rs | examples/stm32g0/src/bin/usart_buffered.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::usart::{BufferedUart, Config};
use embassy_stm32::{bind_interrupts, peripherals, usart};
use embedded_io_async::{Read, Write};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
USART1 => usart::BufferedInte... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/i2c_async.rs | examples/stm32g0/src/bin/i2c_async.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::i2c::{self, I2c};
use embassy_stm32::{bind_interrupts, peripherals};
use embassy_time::{Duration, Timer};
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
I2C1 => i2c::EventInterruptHandler<peripherals::I2... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/adc.rs | examples/stm32g0/src/bin/adc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::adc::{Adc, Clock, Presc, SampleTime};
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!("Hel... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32g0/src/bin/blinky.rs | examples/stm32g0/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/mspm0c1104/build.rs | examples/mspm0c1104/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/mspm0c1104/src/bin/button.rs | examples/mspm0c1104/src/bin/button.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_mspm0::Config;
use embassy_mspm0::gpio::{Input, Level, Output, Pull};
use {defmt_rtt as _, panic_halt as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) -> ! {
info!("Hello world!");
let p = embassy_mspm0::init(Con... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mspm0c1104/src/bin/uart.rs | examples/mspm0c1104/src/bin/uart.rs | //! Example of using blocking uart
//!
//! This uses the virtual COM port provided on the LP-MSPM0C1104 board.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_mspm0::uart::{Config, Uart};
use {defmt_rtt as _, panic_halt 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/mspm0c1104/src/bin/wwdt.rs | examples/mspm0c1104/src/bin/wwdt.rs | //! Example of using window watchdog timer in the MSPM0C1104 chip.
//!
//! It tests the use case when watchdog timer is expired and when watchdog is pet too early.
#![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_mspm0::gpio::{Level, Output};
use embassy_mspm0::wwdt::{ClosedWindowPercen... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mspm0c1104/src/bin/blinky.rs | examples/mspm0c1104/src/bin/blinky.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_mspm0::Config;
use embassy_mspm0::gpio::{Level, Output};
use embassy_time::Timer;
use {defmt_rtt as _, panic_halt as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) -> ! {
info!("Hello world!");
let p = embassy_mspm... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/build.rs | examples/mcxa/build.rs | use std::env;
use std::fs::File;
use std::io::Write;
use std::path::PathBuf;
fn main() {
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
// Generate memory.x - put "FLASH" at start of RAM, RAM after "FLASH"
// cortex-m-rt expects FLASH for code, RAM for data/bss/stack
// Both are in RAM, bu... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/button.rs | examples/mcxa/src/bin/button.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_time::Timer;
use hal::gpio::{Input, Pull};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = hal::init(hal::config::Config::default());
defmt::info!("Button exampl... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/i2c-async.rs | examples/mcxa/src/bin/i2c-async.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_time::Timer;
use hal::bind_interrupts;
use hal::clocks::config::Div8;
use hal::config::Config;
use hal::i2c::InterruptHandler;
use hal::i2c::controller::{self, I2c, Speed};
use hal::peripherals::LPI2C3;
use {defmt_rtt as _, embassy_mcxa as hal, panic_pr... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/raw_dma_memset.rs | examples/mcxa/src/bin/raw_dma_memset.rs | //! DMA memset example for MCXA276.
//!
//! NOTE: this is a "raw dma" example! It exists as a proof of concept, as we don't have
//! a high-level and safe API for. It should not be taken as typical, recommended, or
//! stable usage!
//!
//! This example demonstrates using DMA to fill a buffer with a repeated pattern.
/... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/lpuart_buffered.rs | examples/mcxa/src/bin/lpuart_buffered.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::clocks::config::Div8;
use embassy_mcxa::lpuart::Config;
use embassy_mcxa::lpuart::buffered::BufferedLpuart;
use embassy_mcxa::{bind_interrupts, lpuart};
use embedded_io_async::Write;
use {defmt_rtt as _, embassy_mcxa as hal, 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/mcxa/src/bin/raw_dma_ping_pong_transfer.rs | examples/mcxa/src/bin/raw_dma_ping_pong_transfer.rs | //! DMA ping-pong/double-buffer transfer example for MCXA276.
//!
//! NOTE: this is a "raw dma" example! It exists as a proof of concept, as we don't have
//! a high-level and safe API for. It should not be taken as typical, recommended, or
//! stable usage!
//!
//! This example demonstrates two approaches for ping-pon... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/i2c-scan-blocking.rs | examples/mcxa/src/bin/i2c-scan-blocking.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::gpio::{Input, Pull};
use embassy_time::Timer;
use hal::clocks::config::Div8;
use hal::config::Config;
use hal::i2c::controller::{self, I2c, Speed};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
#[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/mcxa/src/bin/lpuart_polling.rs | examples/mcxa/src/bin/lpuart_polling.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::clocks::config::Div8;
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
use crate::hal::lpuart::{Config, Lpuart};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let mut cfg = hal::config::Config::default();
cfg.c... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/lpuart_dma.rs | examples/mcxa/src/bin/lpuart_dma.rs | //! LPUART DMA example for MCXA276.
//!
//! This example demonstrates using DMA for UART TX and RX operations.
//! It sends a message using DMA, then waits for 16 characters to be received
//! via DMA and echoes them back.
//!
//! The DMA request sources are automatically derived from the LPUART instance type.
//! DMA ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/dma_mem_to_mem.rs | examples/mcxa/src/bin/dma_mem_to_mem.rs | //! DMA memory-to-memory transfer example for MCXA276.
//!
//! This example demonstrates using DMA to copy data between memory buffers
//! using the Embassy-style async API with type-safe transfers.
//!
//! # Embassy-style features demonstrated:
//! - `TransferOptions` for configuration
//! - Type-safe `mem_to_mem<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/mcxa/src/bin/adc_polling.rs | examples/mcxa/src/bin/adc_polling.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::adc::{ConvCommandConfig, ConvTriggerConfig};
use embassy_time::{Duration, Ticker};
use hal::adc::{Adc, LpadcConfig, TriggerPriorityPolicy};
use hal::clocks::PoweredClock;
use hal::clocks::config::Div8;
use hal::clocks::periph_helpers::{AdcClockSel... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/hello.rs | examples/mcxa/src/bin/hello.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::clocks::config::Div8;
use hal::lpuart::{Blocking, Config, Lpuart};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
/// Simple helper to write a byte as hex to UART
fn write_hex_byte(uart: &mut Lpuart<'_, Blocking>, byte: u8) {
co... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/button_async.rs | examples/mcxa/src/bin/button_async.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_time::Timer;
use hal::gpio::{Input, Pull};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = hal::init(hal::config::Config::default());
defmt::info!("GPIO interrup... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/reset-reason.rs | examples/mcxa/src/bin/reset-reason.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use hal::config::Config;
use hal::reset_reason::reset_reason;
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let config = Config::default();
let _p = hal::init(config);
for rea... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/raw_dma_scatter_gather.rs | examples/mcxa/src/bin/raw_dma_scatter_gather.rs | //! DMA scatter-gather transfer example for MCXA276.
//!
//! NOTE: this is a "raw dma" example! It exists as a proof of concept, as we don't have
//! a high-level and safe API for. It should not be taken as typical, recommended, or
//! stable usage!
//!
//! This example demonstrates using DMA with scatter/gather to cha... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/crc.rs | examples/mcxa/src/bin/crc.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use hal::config::Config;
use hal::crc::Crc;
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
const CCITT_FALSE: crc::Algorithm<u16> = crc::Algorithm {
width: 16,
poly: 0x1021,
init: 0xffff,
refin: false,
refout: false,
xorout: 0... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/lpuart_ring_buffer.rs | examples/mcxa/src/bin/lpuart_ring_buffer.rs | //! LPUART Ring Buffer DMA example for MCXA276.
//!
//! This example demonstrates using the high-level `LpuartRxDma::setup_ring_buffer()`
//! API for continuous circular DMA reception from a UART peripheral.
//!
//! # Features demonstrated:
//! - `LpuartRxDma::setup_ring_buffer()` for continuous peripheral-to-memory DM... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/raw_dma_interleave_transfer.rs | examples/mcxa/src/bin/raw_dma_interleave_transfer.rs | //! DMA interleaved transfer example for MCXA276.
//!
//! NOTE: this is a "raw dma" example! It exists as a proof of concept, as we don't have
//! a high-level and safe API for. It should not be taken as typical, recommended, or
//! stable usage!
//!
//! This example demonstrates using DMA with custom source/destinatio... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/raw_dma_channel_link.rs | examples/mcxa/src/bin/raw_dma_channel_link.rs | //! DMA channel linking example for MCXA276.
//!
//! NOTE: this is a "raw dma" example! It exists as a proof of concept, as we don't have
//! a high-level and safe API for. It should not be taken as typical, recommended, or
//! stable usage!
//!
//! This example demonstrates DMA channel linking (minor and major loop li... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/clkout.rs | examples/mcxa/src/bin/clkout.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::clkout::{ClockOut, ClockOutSel, Config, Div4};
use embassy_mcxa::clocks::PoweredClock;
use embassy_mcxa::clocks::config::{SoscConfig, SoscMode, SpllConfig, SpllMode, SpllSource};
use embassy_mcxa::gpio::{DriveStrength, Level, Output, SlewRate};
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/mcxa/src/bin/rtc_alarm.rs | examples/mcxa/src/bin/rtc_alarm.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_mcxa::bind_interrupts;
use hal::rtc::{InterruptHandler, Rtc, RtcDateTime};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
bind_interrupts!(struct Irqs {
RTC => InterruptHandler<hal::rtc::Rtc0>;
});
#[embassy_executor::main]
async fn ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/dma_wrap_transfer.rs | examples/mcxa/src/bin/dma_wrap_transfer.rs | //! DMA wrap transfer example for MCXA276.
//!
//! This example demonstrates using DMA with modulo addressing to wrap around
//! a source buffer, effectively repeating the source data in the destination.
//!
//! # Embassy-style features demonstrated:
//! - `DmaChannel::is_done()` and `clear_done()` helper methods
//! -... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/trng.rs | examples/mcxa/src/bin/trng.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use hal::bind_interrupts;
use hal::config::Config;
use hal::trng::{self, InterruptHandler, Trng};
use rand_core::RngCore;
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
bind_interrupts!(
struct Irqs {
TRNG0 => InterruptHandler;
}
);
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/dma_scatter_gather_builder.rs | examples/mcxa/src/bin/dma_scatter_gather_builder.rs | //! DMA Scatter-Gather Builder example for MCXA276.
//!
//! This example demonstrates using the new `ScatterGatherBuilder` API for
//! chaining multiple DMA transfers with a type-safe builder pattern.
//!
//! # Features demonstrated:
//! - `ScatterGatherBuilder::new()` for creating a builder
//! - `add_transfer()` for ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/blinky.rs | examples/mcxa/src/bin/blinky.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_time::Timer;
use hal::gpio::{DriveStrength, Level, Output, SlewRate};
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
let p = hal::init(hal::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/mcxa/src/bin/adc_interrupt.rs | examples/mcxa/src/bin/adc_interrupt.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_time::{Duration, Ticker};
use hal::adc::{Adc, InterruptHandler, LpadcConfig, TriggerPriorityPolicy};
use hal::bind_interrupts;
use hal::clocks::PoweredClock;
use hal::clocks::config::Div8;
use hal::clocks::periph_helpers::{AdcClockSel, Div4};
use hal::c... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/mcxa/src/bin/i2c-blocking.rs | examples/mcxa/src/bin/i2c-blocking.rs | #![no_std]
#![no_main]
use embassy_executor::Spawner;
use embassy_time::Timer;
use hal::clocks::config::Div8;
use hal::config::Config;
use hal::i2c::controller::{self, I2c, Speed};
use tmp108::Tmp108;
use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _};
#[embassy_executor::main]
async fn main(_spawner: Spawne... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf9151/ns/build.rs | examples/nrf9151/ns/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/nrf9151/ns/src/bin/uart.rs | examples/nrf9151/ns/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 {
SERIAL0 => uarte::InterruptHandler<peripherals::SERIAL0>;
});
#[embassy_executor::main]
async fn main(_spawner: Spawne... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf9151/ns/src/bin/blinky.rs | examples/nrf9151/ns/src/bin/blinky.rs | #![no_std]
#![no_main]
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 = Output::new(p.P0... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/nrf9151/s/build.rs | examples/nrf9151/s/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/nrf9151/s/src/bin/blinky.rs | examples/nrf9151/s/src/bin/blinky.rs | #![no_std]
#![no_main]
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 = Output::new(p.P0... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32h723/build.rs | examples/stm32h723/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/stm32h723/src/bin/spdifrx.rs | examples/stm32h723/src/bin/spdifrx.rs | //! This example receives inputs on SPDIFRX and outputs on SAI4.
//!
//! Only very few controllers connect the SPDIFRX symbol clock to a SAI peripheral's clock input.
//! However, this is necessary for synchronizing the symbol rates and avoiding glitches.
#![no_std]
#![no_main]
use defmt::{info, trace};
use 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/stm32f7/build.rs | examples/stm32f7/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/stm32f7/src/bin/button.rs | examples/stm32f7/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.PC13, 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/stm32f7/src/bin/qspi.rs | examples/stm32f7/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::Async;
use embassy_stm32::qspi::enums::{AddressSize, ChipSelectHighTime, FIFOThresholdLevel, MemorySiz... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f7/src/bin/flash.rs | examples/stm32f7/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/stm32f7/src/bin/usb_serial.rs | examples/stm32f7/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::{Driver, Instance};
use embassy_stm32::{Config, bind_interrupts, peripherals, usb};
use embassy_usb::Builder;
use embassy_usb::class::cdc_acm::{CdcAcmCla... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f7/src/bin/eth.rs | examples/stm32f7/src/bin/eth.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_net::tcp::TcpSocket;
use embassy_net::{Ipv4Address, StackResources};
use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue, Sma};
use embassy_stm32::peripherals::{ETH, ETH_SMA};
use embassy_stm32::rng::Rng;
use embassy_stm32::time::He... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f7/src/bin/pwm.rs | examples/stm32f7/src/bin/pwm.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_stm32::gpio::OutputType;
use embassy_stm32::time::{Hertz, mhz};
use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
// If you are trying th... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f7/src/bin/usart_dma.rs | examples/stm32f7/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 {
UART7 => 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/stm32f7/src/bin/can.rs | examples/stm32f7/src/bin/can.rs | #![no_std]
#![no_main]
use core::num::{NonZeroU8, NonZeroU16};
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::can::filter::Mask32;
use embassy_stm32::can::{
Can, CanTx, Fifo, Frame, Rx0InterruptHandler, Rx1InterruptHandler, SceInterruptHandler, StandardId,
TxInterruptHandler,
};
use embassy_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/stm32f7/src/bin/button_exti.rs | examples/stm32f7/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/stm32f7/src/bin/hello.rs | examples/stm32f7/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/stm32f7/src/bin/hash.rs | examples/stm32f7/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/stm32f7/src/bin/cryp.rs | examples/stm32f7/src/bin/cryp.rs | #![no_std]
#![no_main]
use aes_gcm::Aes128Gcm;
use aes_gcm::aead::heapless::Vec;
use aes_gcm::aead::{AeadInPlace, KeyInit};
use defmt::info;
use embassy_executor::Spawner;
use embassy_stm32::cryp::{self, *};
use embassy_stm32::{Config, bind_interrupts, peripherals};
use embassy_time::Instant;
use {defmt_rtt as _, pani... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f7/src/bin/pwm_ringbuffer.rs | examples/stm32f7/src/bin/pwm_ringbuffer.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::Config;
use embassy_stm32::gpio::OutputType;
use embassy_stm32::time::mhz;
use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
// If you are trying this and yo... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/examples/stm32f7/src/bin/sdmmc.rs | examples/stm32f7/src/bin/sdmmc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::sdmmc::Sdmmc;
use embassy_stm32::sdmmc::sd::{CmdBlock, StorageDevice};
use embassy_stm32::time::{Hertz, mhz};
use embassy_stm32::{Config, bind_interrupts, peripherals, sdmmc};
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/stm32f7/src/bin/adc.rs | examples/stm32f7/src/bin/adc.rs | #![no_std]
#![no_main]
use defmt::*;
use embassy_executor::Spawner;
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 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/stm32f7/src/bin/blinky.rs | examples/stm32f7/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/embassy-rp/build.rs | embassy-rp/build.rs | use std::env;
use std::ffi::OsStr;
use std::fs::File;
use std::io::Write;
use std::path::{Path, PathBuf};
fn main() {
if env::var("CARGO_FEATURE_RP2040").is_ok() {
// Put the linker script somewhere the linker can find it
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
let link_x... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/bootsel.rs | embassy-rp/src/bootsel.rs | //! Boot Select button
//!
//! The RP2040 rom supports a BOOTSEL button that is used to enter the USB bootloader
//! if held during reset. To avoid wasting GPIO pins, the button is multiplexed onto
//! the CS pin of the QSPI flash, but that makes it somewhat expensive and complicated
//! to utilize outside of the rom's... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/relocate.rs | embassy-rp/src/relocate.rs | use pio::{Program, SideSet, Wrap};
pub struct CodeIterator<'a, I>
where
I: Iterator<Item = &'a u16>,
{
iter: I,
offset: u8,
}
impl<'a, I: Iterator<Item = &'a u16>> CodeIterator<'a, I> {
pub fn new(iter: I, offset: u8) -> CodeIterator<'a, I> {
CodeIterator { iter, offset }
}
}
impl<'a, I> ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/i2c.rs | embassy-rp/src/i2c.rs | #![cfg_attr(feature = "defmt", allow(deprecated))] // Suppress warnings for defmt::Format using Error::AddressReserved
//! I2C driver.
use core::future;
use core::marker::PhantomData;
use core::task::Poll;
use embassy_hal_internal::{Peri, PeripheralType};
use embassy_sync::waitqueue::AtomicWaker;
use pac::i2c;
use c... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/time_driver.rs | embassy-rp/src/time_driver.rs | //! Timer driver.
use core::cell::{Cell, RefCell};
use critical_section::CriticalSection;
use embassy_sync::blocking_mutex::Mutex;
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
use embassy_time_driver::Driver;
use embassy_time_queue_utils::Queue;
#[cfg(feature = "rp2040")]
use pac::TIMER;
#[cfg(featu... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/flash.rs | embassy-rp/src/flash.rs | //! Flash driver.
use core::future::Future;
use core::marker::PhantomData;
use core::pin::Pin;
use core::task::{Context, Poll};
use embassy_hal_internal::{Peri, PeripheralType};
use embedded_storage::nor_flash::{
ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash, check_erase, ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/otp.rs | embassy-rp/src/otp.rs | //! Interface to the RP2350's One Time Programmable Memory
// Credit: taken from `rp-hal` (also licensed Apache+MIT)
// https://github.com/rp-rs/rp-hal/blob/main/rp235x-hal/src/rom_data.rs
use crate::rom_data::otp_access;
/// The ways in which we can fail to access OTP
#[derive(Debug, Clone)]
#[cfg_attr(feature = "d... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/lib.rs | embassy-rp/src/lib.rs | #![no_std]
#![allow(async_fn_in_trait)]
#![allow(unsafe_op_in_unsafe_fn)]
#![allow(unused_unsafe)]
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
//! ## Feature flags
#![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)]
// Th... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/clocks.rs | embassy-rp/src/clocks.rs | //! # Clock configuration for the RP2040 and RP235x microcontrollers.
//!
//! # Clock Configuration API
//!
//! This module provides both high-level convenience functions and low-level manual
//! configuration options for the RP2040 clock system.
//!
//! ## High-Level Convenience Functions
//!
//! For most users, these... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/i2c_slave.rs | embassy-rp/src/i2c_slave.rs | //! I2C slave driver.
use core::future;
use core::marker::PhantomData;
use core::task::Poll;
use pac::i2c;
use crate::i2c::{AbortReason, FIFO_SIZE, Instance, InterruptHandler, SclPin, SdaPin, set_up_i2c_pin};
use crate::interrupt::typelevel::{Binding, Interrupt};
use crate::{Peri, pac};
/// I2C error
#[derive(Debug,... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/spinlock_mutex.rs | embassy-rp/src/spinlock_mutex.rs | //! Mutex implementation utilizing an hardware spinlock
use core::marker::PhantomData;
use core::sync::atomic::Ordering;
use embassy_sync::blocking_mutex::raw::RawMutex;
use crate::spinlock::{Spinlock, SpinlockValid};
/// A mutex that allows borrowing data across executors and interrupts by utilizing an hardware sp... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/pwm.rs | embassy-rp/src/pwm.rs | //! Pulse Width Modulation (PWM)
use embassy_hal_internal::{Peri, PeripheralType};
pub use embedded_hal_1::pwm::SetDutyCycle;
use embedded_hal_1::pwm::{Error, ErrorKind, ErrorType};
use fixed::FixedU16;
use fixed::traits::ToFixed;
use pac::pwm::regs::{ChDiv, Intr};
use pac::pwm::vals::Divmode;
use crate::gpio::{AnyPi... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/critical_section_impl.rs | embassy-rp/src/critical_section_impl.rs | use core::sync::atomic::{AtomicU8, Ordering};
use crate::pac;
use crate::spinlock::Spinlock;
struct RpSpinlockCs;
critical_section::set_impl!(RpSpinlockCs);
/// Marker value to indicate no-one has the lock.
///
/// Initialising `LOCK_OWNER` to 0 means cheaper static initialisation so it's the best choice
const LOCK_... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/dma.rs | embassy-rp/src/dma.rs | //! Direct Memory Access (DMA)
use core::future::Future;
use core::pin::Pin;
use core::sync::atomic::{Ordering, compiler_fence};
use core::task::{Context, Poll};
use embassy_hal_internal::{Peri, PeripheralType, impl_peripheral};
use embassy_sync::waitqueue::AtomicWaker;
use pac::dma::vals::DataSize;
use crate::interr... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/multicore.rs | embassy-rp/src/multicore.rs | //! Multicore support
//!
//! This module handles setup of the 2nd cpu core on the rp2040, which we refer to as core1.
//! It provides functionality for setting up the stack, and starting core1.
//!
//! The entrypoint for core1 can be any function that never returns, including closures.
//!
//! Enable the `critical-sec... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/block.rs | embassy-rp/src/block.rs | //! Support for the RP235x Boot ROM's "Block" structures
//!
//! Blocks contain pointers, to form Block Loops.
//!
//! The `IMAGE_DEF` Block (here the `ImageDef` type) tells the ROM how to boot a
//! firmware image. The `PARTITION_TABLE` Block (here the `PartitionTable` type)
//! tells the ROM how to divide the flash s... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/watchdog.rs | embassy-rp/src/watchdog.rs | //! Watchdog
//!
//! The watchdog is a countdown timer that can restart parts of the chip if it reaches zero. This can be used to restart the
//! processor if software gets stuck in an infinite loop. The programmer must periodically write a value to the watchdog to
//! stop it from reaching zero.
//!
//! Credit: based ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/qmi_cs1.rs | embassy-rp/src/qmi_cs1.rs | //! QMI CS1 peripheral for RP235x
//!
//! This module provides access to the QMI CS1 functionality for use with external memory devices
//! such as PSRAM. The QMI (Quad SPI) controller supports CS1 as a second chip select signal.
//!
//! This peripheral is only available on RP235x chips.
#![cfg(feature = "_rp235x")]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/spinlock.rs | embassy-rp/src/spinlock.rs | use crate::pac;
pub struct Spinlock<const N: usize>(core::marker::PhantomData<()>)
where
Spinlock<N>: SpinlockValid;
impl<const N: usize> Spinlock<N>
where
Spinlock<N>: SpinlockValid,
{
/// Try to claim the spinlock. Will return `Some(Self)` if the lock is obtained, and `None` if the lock is
/// alrea... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/spi.rs | embassy-rp/src/spi.rs | //! Serial Peripheral Interface
use core::marker::PhantomData;
use embassy_embedded_hal::SetConfig;
use embassy_futures::join::join;
use embassy_hal_internal::{Peri, PeripheralType};
pub use embedded_hal_02::spi::{Phase, Polarity};
use crate::dma::{AnyChannel, Channel};
use crate::gpio::{AnyPin, Pin as GpioPin, Seale... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/psram.rs | embassy-rp/src/psram.rs | //! PSRAM driver for APS6404L and compatible devices
//!
//! This driver provides support for PSRAM (Pseudo-Static RAM) devices connected via QMI CS1.
//! It handles device verification, initialization, and memory-mapped access configuration.
//!
//! This driver is only available on RP235x chips as it requires the QMI ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/intrinsics.rs | embassy-rp/src/intrinsics.rs | #![macro_use]
// Credit: taken from `rp-hal` (also licensed Apache+MIT)
// https://github.com/rp-rs/rp-hal/blob/main/rp2040-hal/src/intrinsics.rs
/// Generate a series of aliases for an intrinsic function.
macro_rules! intrinsics_aliases {
(
extern $abi:tt fn $name:ident( $($argname:ident: $ty:ty),* ) -> ... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/usb.rs | embassy-rp/src/usb.rs | //! USB driver.
use core::future::poll_fn;
use core::marker::PhantomData;
use core::slice;
use core::sync::atomic::{Ordering, compiler_fence};
use core::task::Poll;
use embassy_hal_internal::PeripheralType;
use embassy_sync::waitqueue::AtomicWaker;
use embassy_usb_driver as driver;
use embassy_usb_driver::{
Direct... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/reset.rs | embassy-rp/src/reset.rs | pub use pac::resets::regs::Peripherals;
use crate::pac;
pub const ALL_PERIPHERALS: Peripherals = Peripherals(0x01ff_ffff);
pub(crate) fn reset(peris: Peripherals) {
pac::RESETS.reset().write_value(peris);
}
pub(crate) fn unreset_wait(peris: Peripherals) {
// TODO use the "atomic clear" register version
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/trng.rs | embassy-rp/src/trng.rs | //! True Random Number Generator (TRNG) driver.
use core::future::poll_fn;
use core::marker::PhantomData;
use core::ops::Not;
use core::task::Poll;
use embassy_hal_internal::{Peri, PeripheralType};
use embassy_sync::waitqueue::AtomicWaker;
use crate::interrupt::typelevel::{Binding, Interrupt};
use crate::peripherals... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/adc.rs | embassy-rp/src/adc.rs | //! ADC driver.
use core::future::{Future, poll_fn};
use core::marker::PhantomData;
use core::mem;
use core::sync::atomic::{Ordering, compiler_fence};
use core::task::Poll;
use embassy_sync::waitqueue::AtomicWaker;
use crate::gpio::{self, AnyPin, Pull, SealedPin as GpioPin};
use crate::interrupt::InterruptExt;
use cr... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/fmt.rs | embassy-rp/src/fmt.rs | #![macro_use]
#![allow(unused)]
use core::fmt::{Debug, Display, LowerHex};
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You may not enable both `defmt` and `log` features.");
#[collapse_debuginfo(yes)]
macro_rules! assert {
($($x:tt)*) => {
{
#[cfg(not(feature = "defmt"))]
... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | false |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/gpio.rs | embassy-rp/src/gpio.rs | //! GPIO driver.
#![macro_use]
use core::convert::Infallible;
use core::future::Future;
use core::pin::Pin as FuturePin;
use core::task::{Context, Poll};
use embassy_hal_internal::{Peri, PeripheralType, impl_peripheral};
use embassy_sync::waitqueue::AtomicWaker;
use crate::interrupt::InterruptExt;
use crate::pac::SIO... | rust | Apache-2.0 | f242d794e3325bc9b3559e50d2ea7fc293e1d574 | 2026-01-04T15:48:40.485023Z | true |
embassy-rs/embassy | https://github.com/embassy-rs/embassy/blob/f242d794e3325bc9b3559e50d2ea7fc293e1d574/embassy-rp/src/uart/buffered.rs | embassy-rp/src/uart/buffered.rs | //! Buffered UART driver.
use core::future::Future;
use core::slice;
use core::sync::atomic::{AtomicU8, Ordering};
use embassy_hal_internal::atomic_ring_buffer::RingBuffer;
use super::*;
pub struct State {
tx_waker: AtomicWaker,
tx_buf: RingBuffer,
rx_waker: AtomicWaker,
rx_buf: RingBuffer,
rx_er... | 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.