embassy-stm32

Crates

git

Versions

stm32n645a0

Flavors

Pipe1Config

Struct Pipe1Config 

Source
#[non_exhaustive]
pub struct Pipe1Config { pub source: InputSource, pub virtual_channel: u8, pub csi_data_type: u8, pub output: PixelFormat, pub pitch_bytes: u16, pub swap_rb: bool, pub demosaic: Option<BayerPattern>, pub crop: Option<CropConfig>, pub downsize: Option<DownsizeConfig>, }
Expand description

Pipe1 (main) 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.
§source: InputSource

Upstream source.

§virtual_channel: u8

CSI-2 virtual channel (0..=3) to latch pixels from.

§csi_data_type: u8

CSI-2 data type ID to filter the incoming stream (e.g. 0x2B for RAW10, 0x24 for RGB888). Ignored when source is InputSource::Parallel. Defaults to 0x2B (RAW10) — the most common Bayer-sensor format.

§output: PixelFormat

Output pixel format as written to memory.

§pitch_bytes: u16

Line pitch in bytes. Must be a multiple of 16 per RM0486 §39.14.88.

§swap_rb: bool

Swap R/B components (or U/V for YUV). Useful e.g. to flip NV21 ↔ NV12.

§demosaic: Option<BayerPattern>

Demosaic configuration. None bypasses the demosaic block (input must already be RGB/YUV). Some(pattern) enables it for the given Bayer layout — required when the sensor feeds 8/10/12/14-bit raw Bayer.

§crop: Option<CropConfig>

Crop window (in pixels). Applied before downsize.

§downsize: Option<DownsizeConfig>

Downsize configuration. Ratios outside 1×..8× are clamped.

Implementations§

Source§

impl Pipe1Config

Source

pub const fn new( source: InputSource, output: PixelFormat, pitch_bytes: u16, ) -> Self

Create a Pipe1 configuration with default R/B order, virtual channel 0, RAW10 CSI data type, no demosaic, no crop, and no downsize. pitch_bytes must be a multiple of 16 (DCMIPP output alignment).

Auto Trait Implementations§

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.