pub fn wait(mut self) -> (Result<(), DmaError>, Dpi<'d, Dm>, BUF) {
        while !self.is_done() {
            core::hint::spin_loop();
        }

        // Stop the DMA.
        //
        // If the user sends more data to the DMA than the LCD_CAM needs for a single
        // frame, the DMA will still be running after the LCD_CAM stops.
        self.dpi.tx_channel.stop_transfer();

        // Note: There is no "done" interrupt to clear.

        let (dpi, view) = self.release();
        let result = if dpi.tx_channel.has_error() {
            Err(DmaError::DescriptorError)
        } else {
            Ok(())
        };

        (result, dpi, BUF::from_view(view))
    }
Waits for the transfer to finish and returns the peripheral and buffer.

Note: If you specified `next_frame_en` as true in [Dpi::send], you're
just waiting for a DMA error when you call this.
esp-hal/src/lcd_cam/lcd/dpi.rs