pub struct CameraTransfer<'d, BUF: DmaRxBuffer, Dm: DriverMode = Blocking> { /* private fields */ }Expand description
Represents an ongoing (or potentially stopped) transfer from the Camera to a DMA buffer.
Implementations§
Source§impl<'d, BUF: DmaRxBuffer, Dm: DriverMode> CameraTransfer<'d, BUF, Dm>
impl<'d, BUF: DmaRxBuffer, Dm: DriverMode> CameraTransfer<'d, BUF, Dm>
Source§impl<BUF: DmaRxBuffer> CameraTransfer<'_, BUF, Async>
impl<BUF: DmaRxBuffer> CameraTransfer<'_, BUF, Async>
Sourcepub async fn wait_for_dma_eof(&mut self) -> Result<(), DmaError>
pub async fn wait_for_dma_eof(&mut self) -> Result<(), DmaError>
Waits for a DMA EOF or receive error in this transfer.
The EOF boundary is configured by Config::with_eof_mode.
Reception can start partway through a frame, so EOF alone does not
guarantee that a complete frame has been received.
This does not stop the camera or DMA. Call Self::stop to return
the camera and buffer. After a successful wait, another call can wait
for a later EOF. Receive errors are retained for this transfer.
EOF status is latched: multiple EOFs before the wait consumes the status
are reported as one event.
§Errors
Returns DmaError::DescriptorError if DMA reports an invalid
descriptor, descriptor exhaustion, or an error EOF.
Receive errors take precedence over a pending EOF.
§Cancellation Safety
Dropping the future does not stop the camera or DMA. The wait can be retried.
Trait Implementations§
Source§impl<BUF: DmaRxBuffer, Dm: DriverMode> Deref for CameraTransfer<'_, BUF, Dm>
Available on crate feature unstable only.
impl<BUF: DmaRxBuffer, Dm: DriverMode> Deref for CameraTransfer<'_, BUF, Dm>
unstable only.Source§impl<BUF: DmaRxBuffer, Dm: DriverMode> DerefMut for CameraTransfer<'_, BUF, Dm>
Available on crate feature unstable only.
impl<BUF: DmaRxBuffer, Dm: DriverMode> DerefMut for CameraTransfer<'_, BUF, Dm>
unstable only.Source§impl<BUF: DmaRxBuffer, Dm: DriverMode> Drop for CameraTransfer<'_, BUF, Dm>
Available on crate feature unstable only.
impl<BUF: DmaRxBuffer, Dm: DriverMode> Drop for CameraTransfer<'_, BUF, Dm>
unstable only.Auto Trait Implementations§
impl<'d, BUF, Dm = Blocking> !RefUnwindSafe for CameraTransfer<'d, BUF, Dm>
impl<'d, BUF, Dm = Blocking> !UnwindSafe for CameraTransfer<'d, BUF, Dm>
impl<'d, BUF, Dm> Freeze for CameraTransfer<'d, BUF, Dm>where
<BUF as DmaRxBuffer>::View: Freeze,
impl<'d, BUF, Dm> Send for CameraTransfer<'d, BUF, Dm>where
<BUF as DmaRxBuffer>::View: Send,
Dm: Send,
impl<'d, BUF, Dm> Sync for CameraTransfer<'d, BUF, Dm>where
<BUF as DmaRxBuffer>::View: Sync,
Dm: Sync,
impl<'d, BUF, Dm> Unpin for CameraTransfer<'d, BUF, Dm>where
<BUF as DmaRxBuffer>::View: Unpin,
Dm: Unpin,
impl<'d, BUF, Dm> UnsafeUnpin for CameraTransfer<'d, BUF, Dm>where
<BUF as DmaRxBuffer>::View: UnsafeUnpin,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CryptoRng for Twhere
T: DerefMut,
<T as Deref>::Target: CryptoRng,
impl<R> CryptoRng for Rwhere
R: TryCryptoRng<Error = Infallible> + ?Sized,
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,
impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,
impl<R> RngCore for Rwhere
R: Rng,
impl<R> TryCryptoRng for Rwhere
R: CryptoRng + ?Sized,
impl<R> TryCryptoRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryCryptoRng,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
§impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
Source§impl<R> TryRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryRng,
impl<R> TryRng for Rwhere
R: DerefMut,
<R as Deref>::Target: TryRng,
Source§type Error = <<R as Deref>::Target as TryRng>::Error
type Error = <<R as Deref>::Target as TryRng>::Error
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>
u64.Source§fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>
fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>
dst entirely with random data.Source§impl<R> TryRngCore for Rwhere
R: RngCore + ?Sized,
impl<R> TryRngCore for Rwhere
R: RngCore + ?Sized,
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest entirely with random data.Source§fn unwrap_err(self) -> UnwrapErr<Self>where
Self: Sized,
fn unwrap_err(self) -> UnwrapErr<Self>where
Self: Sized,
UnwrapErr wrapper.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut wrapper.