embassy-stm32

Crates

git

Versions

stm32h573zi

Flavors

Struct Table

Source
#[repr(C)]
pub struct Table<const ITEM_COUNT: usize> { pub items: [LinearItem; ITEM_COUNT], }
Expand description

A table of linked list items.

Fields§

§items: [LinearItem; ITEM_COUNT]

The items.

Implementations§

Source§

impl<const ITEM_COUNT: usize> Table<ITEM_COUNT>

Source

pub fn new(items: [LinearItem; ITEM_COUNT]) -> Self

Create a new table.

Source

pub unsafe fn new_ping_pong<W: Word>( request: Request, peri_addr: *mut W, buffer: &mut [W], direction: Dir, ) -> Table<2>

Create a ping-pong linked-list table.

This uses two linked-list items, one for each half of the buffer.

Link the table as given by the run mode.

Source

pub fn len(&self) -> usize

The number of linked list items.

Source

pub fn transfer_count(&self) -> usize

The total transfer count of the table in number of words.

Link items of given indices together: first -> second.

Link items sequentially.

Link last to first item.

Unlink all items.

Source

pub fn base_address(&self) -> u16

Linked list base address (upper 16 address bits).

Source

pub fn offset_address(&self, index: usize) -> u16

Linked list offset address (lower 16 address bits) at the selected index.

Auto Trait Implementations§

§

impl<const ITEM_COUNT: usize> Freeze for Table<ITEM_COUNT>

§

impl<const ITEM_COUNT: usize> RefUnwindSafe for Table<ITEM_COUNT>

§

impl<const ITEM_COUNT: usize> Send for Table<ITEM_COUNT>

§

impl<const ITEM_COUNT: usize> Sync for Table<ITEM_COUNT>

§

impl<const ITEM_COUNT: usize> Unpin for Table<ITEM_COUNT>

§

impl<const ITEM_COUNT: usize> UnwindSafe for Table<ITEM_COUNT>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.