embassy-stm32

Crates

git

Versions

stm32h7s7a8

Flavors

embassy_stm32::can::frame

Trait CanHeader

source
pub trait CanHeader: Sized {
    // Required methods
    fn from_header(
        header: Header,
        data: &[u8],
    ) -> Result<Self, FrameCreateError>;
    fn header(&self) -> &Header;
}
Expand description

Trait for FDCAN frame types, providing ability to construct from a Header and to retrieve the Header from a frame

Required Methods§

source

fn from_header(header: Header, data: &[u8]) -> Result<Self, FrameCreateError>

Construct frame from header and payload

source

fn header(&self) -> &Header

Get this frame’s header struct

Object Safety§

This trait is not object safe.

Implementors§