pub fn wait(mut self) -> (Result<(), DmaError>, I8080<'d, Dm>, BUF) {
        while !self.is_done() {}

        // Clear "done" interrupt.
        self.i8080
            .regs()
            .lc_dma_int_clr()
            .write(|w| w.lcd_trans_done_int_clr().set_bit());

        // SAFETY: Since forget is called on self, we know that self.i8080 and
        // self.buf_view won't be touched again.
        let (i8080, view) = unsafe {
            let i8080 = ManuallyDrop::take(&mut self.i8080);
            let view = ManuallyDrop::take(&mut self.buf_view);
            core::mem::forget(self);
            (i8080, view)
        };

        let result = if i8080.tx_channel.has_error() {
            Err(DmaError::DescriptorError)
        } else {
            Ok(())
        };

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

Note: This also clears the transfer interrupt so it can be used in
interrupt handlers to "handle" the interrupt.
esp-hal/src/lcd_cam/lcd/i8080.rs