pub fn free(mut self) -> (STREAM, PERIPHERAL, BUF, Option<BUF>) {
        self.stream.disable();

        // Protect the instruction and bus sequence of the preceding disable and
        // the subsequent buffer access.
        fence(Ordering::SeqCst);

        self.stream.clear_interrupts();

        unsafe {
            let stream = ptr::read(&self.stream);
            let peripheral = ptr::read(&self.peripheral);
            let buf = ptr::read(&self.buf[0]);
            let double_buf = ptr::read(&self.buf[1]);
            mem::forget(self);
            (stream, peripheral, buf.unwrap(), double_buf)
        }
    }
/// Stops the stream and returns the underlying resources.
Stops the stream and returns the underlying resources.
Stops the stream and returns the underlying resources .
pub fn free(mut self) -> (STREAM, PERIPHERAL, BUF, Option<BUF>) {
        self.stream.disable();
        // Protect the instruction and bus sequence of the preceding disable and
        // the subsequent buffer access.
        fence(Ordering::SeqCst);
        self.stream.clear_interrupts();
        unsafe {
            let stream = ptr::read(&self.stream);
            let peripheral = ptr::read(&self.peripheral);
            let buf = ptr::read(&self.buf[0]);
            let double_buf = ptr::read(&self.buf[1]);
            mem::forget(self);
            (stream, peripheral, buf.unwrap(), double_buf)
        }
    }
pub fn free ( mut self ) -> ( STREAM , PERIPHERAL , BUF , Option < BUF > ) { self . stream . disable ( ) ; // Protect the instruction and bus sequence of the preceding disable and // the subsequent buffer access. fence ( Ordering :: SeqCst ) ; self . stream . clear_interrupts ( ) ; unsafe { let stream = ptr :: read ( & self . stream ) ; let peripheral = ptr :: read ( & self . peripheral ) ; let buf = ptr :: read ( & self . buf [ 0 ] ) ; let double_buf = ptr :: read ( & self . buf [ 1 ] ) ; mem :: forget ( self ) ; ( stream , peripheral , buf . unwrap ( ) , double_buf ) } }
Stops the stream and returns the underlying resources.
Stops the stream and returns the underlying resources .
mut self
mut self