You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: temp.rs
    path of file: ./repos/embassy/embassy-nrf/src
    
    the code of the file until where you have to start completion: //! Builtin temperature sensor driver.

use core::future::poll_fn;
use core::task::Poll;

use embassy_hal_internal::drop::OnDrop;
use embassy_hal_internal::{into_ref, PeripheralRef};
use embassy_sync::waitqueue::AtomicWaker;
use fixed::types::I30F2;

use crate::interrupt::InterruptExt;
use crate::peripherals::TEMP;
use crate::{interrupt, pac, Peripheral};

/// Interrupt handler.
pub struct InterruptHandler {
    _private: (),
}

impl interrupt::typelevel::Handler<interrupt::typelevel::TEMP> for InterruptHandler {
    unsafe fn on_interrupt() {
        let r = unsafe { &*pac::TEMP::PTR };
        r.intenclr.write(|w| w.datardy().clear());
        WAKER.wake();
    }
}

/// Builtin temperature sensor driver.
pub struct Temp<'d> {
    _peri: PeripheralRef<'d, TEMP>,
}

    
    pub async fn read(&mut self) -> I30F2 {
        // In case the future is dropped, stop the task and reset events.
        let on_drop = OnDrop::new(|| {
            let t = Self::regs();
            t.tasks_stop.write(|w| unsafe { w.bits(1) });
            t.events_datardy.reset();
        });

        let t = Self::regs();
        t.intenset.write(|w| w.datardy().set());
        unsafe { t.tasks_start.write(|w| w.bits(1)) };

        let value = poll_fn(|cx| {
            WAKER.register(cx.waker());
            if t.events_datardy.read().bits() == 0 {
                Poll::Pending
            } else {
                t.events_datardy.reset();
                let raw = t.temp.read().bits();
                Poll::Ready(I30F2::from_bits(raw as i32))
            }
        })
        .await;
        on_drop.defuse();
        value
    }