aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/temp.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-05-29 21:30:28 +0200
committerDario Nieuwenhuis <[email protected]>2023-05-29 22:01:19 +0200
commit1a31b03976d73496f649165d9f92c4e19bef93fc (patch)
tree7f8bdb0dcda01d9197b1c53e8c844b52cd40d5a3 /embassy-nrf/src/temp.rs
parent642eb1400ba5508321d7aed438dc5033a652e2fb (diff)
ci: fix nrf, rp tests.
Diffstat (limited to 'embassy-nrf/src/temp.rs')
-rw-r--r--embassy-nrf/src/temp.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/embassy-nrf/src/temp.rs b/embassy-nrf/src/temp.rs
index 3a75ec629..0653710af 100644
--- a/embassy-nrf/src/temp.rs
+++ b/embassy-nrf/src/temp.rs
@@ -56,8 +56,19 @@ impl<'d> Temp<'d> {
56 /// # Example 56 /// # Example
57 /// 57 ///
58 /// ```no_run 58 /// ```no_run
59 /// let mut t = Temp::new(p.TEMP, interrupt::take!(TEMP)); 59 /// use embassy_nrf::{bind_interrupts, temp};
60 /// use embassy_nrf::temp::Temp;
61 /// use embassy_time::{Duration, Timer};
62 ///
63 /// bind_interrupts!(struct Irqs {
64 /// TEMP => temp::InterruptHandler;
65 /// });
66 ///
67 /// # async {
68 /// # let p: embassy_nrf::Peripherals = todo!();
69 /// let mut t = Temp::new(p.TEMP, Irqs);
60 /// let v: u16 = t.read().await.to_num::<u16>(); 70 /// let v: u16 = t.read().await.to_num::<u16>();
71 /// # };
61 /// ``` 72 /// ```
62 pub async fn read(&mut self) -> I30F2 { 73 pub async fn read(&mut self) -> I30F2 {
63 // In case the future is dropped, stop the task and reset events. 74 // In case the future is dropped, stop the task and reset events.