embassy-stm32

Crates

git

Versions

stm32n647a0

Flavors

Config

Struct Config 

Source
#[non_exhaustive]
pub struct Config { pub lanes: LaneCount, pub data_rate_mbps: u32, pub virtual_channels: u8, pub config_clock_mhz: u32, pub hs_freq_range_override: Option<u8>, pub data_type_format: u8, }
Expand description

CSI-2 Host configuration.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§lanes: LaneCount

Number of data lanes in use.

§data_rate_mbps: u32

Nominal data rate per lane in Mbps. Used to look up the D-PHY band table (PFCR.HSFR + the Synopsys oscillator target).

§virtual_channels: u8

Virtual channels to start together as one stream. Bit n enables VC n (0..=3). Defaults to 0b0001 (VC0 only).

§config_clock_mhz: u32

Configuration-clock frequency in MHz feeding the D-PHY test/control interface. Recorded but unused — the BSP-correct CCFR value is hard-coded to 0x28 (matches the Synopsys D-PHY reference) so this field is not driven into the register today.

§hs_freq_range_override: Option<u8>

Override for the D-PHY high-speed frequency-range band (PFCR.HSFR, 7 bits). None looks up the band from data_rate_mbps.

§data_type_format: u8

VCxCFGR1.CDTFT — common data-type format for every enabled VC. Encodes the bits-per-pixel of the incoming stream: 0=6, 1=7, 2=8, 3=10, 4=12, 5=14, 6=16. Defaults to 3 (RAW10), the most common Bayer sensor format.

Implementations§

Source§

impl Config

Source

pub const fn new(lanes: LaneCount, data_rate_mbps: u32) -> Self

Create a configuration with the given lane count and per-lane data rate. Defaults: VC0 only, 24 MHz config clock, HSFR auto-derived, 10 bits-per-pixel (RAW10).

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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.