API referencestd/embedded

std/embedded/chip/esp_gdma

Public declarations, types, methods, and source contracts for std/embedded/chip/esp_gdma.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/embedded/chip/esp_gdma"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
cpu core/cpu esp_gdma.dodo
hal std/embedded/hal esp_gdma.dodo
ptr core/ptr esp_gdma.dodo

BASE

Constant · Source

pub const BASE: usize = 0x6008_0000

PERIPHERAL_UHCI0

Constant · Source

Peripherals in IN_PERI_SEL.

pub const PERIPHERAL_UHCI0: u32 = 2

PERIPHERAL_ADC

Constant · Source

pub const PERIPHERAL_ADC: u32 = 8

NO_PERIPHERAL

Constant · Source

pub const NO_PERIPHERAL: u32 = 0x3F

OWNED

Constant · Source

Descriptor word 0: the part’s size (bits 11-0), the length stored (23-12), EOF (30), and owned by the channel (31); then the part’s address and the next descriptor’s.

pub const OWNED: u32 = 1u32 << 31

EOF

Constant · Source

pub const EOF: u32 = 1 << 30

DESCRIPTOR_BYTES

Constant · Source

pub const DESCRIPTOR_BYTES: usize = 4092

DESCRIPTOR_WORDS

Constant · Source

pub const DESCRIPTOR_WORDS: usize = 3

low32

Function · Source

The low 32 bits of an address: the chip’s own, and on a desktop what a simulated controller matches against the buffers it knows.

pub fn low32(address: usize) -> u32

InRing

Struct · Source

A receive channel streaming into a ring of parts; see above.

pub struct InRing {
    // Private implementation fields omitted.
}

InRing.new

Function · Source

Divide buffer into descriptors.len / 3 parts of the same size, a multiple of 4 bytes up to DESCRIPTOR_BYTES, from its first word-aligned byte, for GDMA channel channel serving peripheral. Nothing starts until start. InvalidInput for fewer than two descriptors or a buffer too short for a word in each part.

pub fn new(channel: u32, peripheral: u32, descriptors: &mut[u32], buffer: &mut[u8]) -> InRing!hal.Error from(descriptors, buffer)

InRing.channel

Function · Source

pub fn channel(&self) -> u32

InRing.part_size

Function · Source

Bytes in each part.

pub fn part_size(&self) -> usize

InRing.parts

Function · Source

pub fn parts(&self) -> usize

InRing.ring_size

Function · Source

The bytes the ring holds when full.

pub fn ring_size(&self) -> usize

InRing.first_descriptor

Function · Source

The address of the first descriptor, where the channel starts.

pub fn first_descriptor(&self) -> usize

InRing.first_part

Function · Source

The address of the first part.

pub fn first_part(&self) -> usize

InRing.start

Function · Source

Link the descriptors into a loop, hand every part to the channel, reset the channel, and start it at the first part.

pub fn start(&mut self, bus: &mut dyn hal.Registers)

InRing.stop

Function · Source

Stop the channel and disconnect it from the peripheral.

pub fn stop(&mut self, bus: &mut dyn hal.Registers)

InRing.stalled

Function · Source

Whether the channel stopped at a part the program had not read: the ring filled up, and whatever the peripheral produced since was lost.

pub fn stalled(&mut self, bus: &mut dyn hal.Registers) -> bool

InRing.available

Function · Source

The bytes in closed parts not yet read.

pub fn available(&mut self) -> usize

InRing.read

Function · Source

Copy bytes of closed parts, oldest first, into out, up to its length, handing each part back to the channel once read; returns how many.

pub fn read(&mut self, out: &mut[u8]) -> usize

Search every guide, reference page, and API declaration.