esp_hal::lcd_cam::cam

Struct CameraTransfer

Source
pub struct CameraTransfer<'d, BUF: DmaRxBuffer> { /* private fields */ }
Available on crate feature unstable only.
Expand description

Represents an ongoing (or potentially stopped) transfer from the Camera to a DMA buffer.

Implementations§

Source§

impl<'d, BUF: DmaRxBuffer> CameraTransfer<'d, BUF>

Source

pub fn is_done(&self) -> bool

Returns true when Self::wait will not block.

Source

pub fn stop(self) -> (Camera<'d>, BUF)

Stops this transfer on the spot and returns the peripheral and buffer.

Source

pub fn wait(self) -> (Result<(), DmaError>, Camera<'d>, BUF)

Waits for the transfer to stop and returns the peripheral and buffer.

Note: The camera doesn’t really “finish” its transfer, so what you’re really waiting for here is a DMA Error. You typically just want to call Self::stop once you have the data you need.

Trait Implementations§

Source§

impl<BUF: DmaRxBuffer> Deref for CameraTransfer<'_, BUF>

Source§

type Target = <BUF as DmaRxBuffer>::View

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<BUF: DmaRxBuffer> DerefMut for CameraTransfer<'_, BUF>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<BUF: DmaRxBuffer> Drop for CameraTransfer<'_, BUF>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'d, BUF> Freeze for CameraTransfer<'d, BUF>
where <BUF as DmaRxBuffer>::View: Freeze,

§

impl<'d, BUF> RefUnwindSafe for CameraTransfer<'d, BUF>
where <BUF as DmaRxBuffer>::View: RefUnwindSafe,

§

impl<'d, BUF> Send for CameraTransfer<'d, BUF>
where <BUF as DmaRxBuffer>::View: Send,

§

impl<'d, BUF> Sync for CameraTransfer<'d, BUF>
where <BUF as DmaRxBuffer>::View: Sync,

§

impl<'d, BUF> Unpin for CameraTransfer<'d, BUF>
where <BUF as DmaRxBuffer>::View: Unpin,

§

impl<'d, BUF> !UnwindSafe for CameraTransfer<'d, BUF>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> Peripheral for T
where T: DerefMut, <T as Deref>::Target: Peripheral,

Source§

type P = <<T as Deref>::Target as Peripheral>::P

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&self) -> <T as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more
Source§

fn map_into<U>(self) -> U
where Self::P: Into<U>, U: Peripheral<P = U>,

Map the peripheral using Into. Read more
Source§

fn map<U>(self, transform: impl FnOnce(Self::P) -> U) -> U
where U: Peripheral<P = U>,

Map the peripheral using Into. Read more
§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.