aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/temp.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-02-01 00:48:33 +0100
committerDario Nieuwenhuis <[email protected]>2023-02-01 01:17:41 +0100
commitb5cf332cc076a0de11ce6a0563a2235c9e57eb5c (patch)
treece14e014dfbe8c3764040d7f9f1ffee84ab5747b /embassy-nrf/src/temp.rs
parentca10fe7135d10084e38038f3cd433da39e505bea (diff)
nrf: docs.
Diffstat (limited to 'embassy-nrf/src/temp.rs')
-rw-r--r--embassy-nrf/src/temp.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-nrf/src/temp.rs b/embassy-nrf/src/temp.rs
index 7a7f61b51..5298faabc 100644
--- a/embassy-nrf/src/temp.rs
+++ b/embassy-nrf/src/temp.rs
@@ -1,4 +1,4 @@
1//! Temperature sensor interface. 1//! Builtin temperature sensor driver.
2 2
3use core::future::poll_fn; 3use core::future::poll_fn;
4use core::task::Poll; 4use core::task::Poll;
@@ -12,7 +12,7 @@ use crate::interrupt::InterruptExt;
12use crate::peripherals::TEMP; 12use crate::peripherals::TEMP;
13use crate::{interrupt, pac, Peripheral}; 13use crate::{interrupt, pac, Peripheral};
14 14
15/// Integrated temperature sensor. 15/// Builtin temperature sensor driver.
16pub struct Temp<'d> { 16pub struct Temp<'d> {
17 _irq: PeripheralRef<'d, interrupt::TEMP>, 17 _irq: PeripheralRef<'d, interrupt::TEMP>,
18} 18}
@@ -20,6 +20,7 @@ pub struct Temp<'d> {
20static WAKER: AtomicWaker = AtomicWaker::new(); 20static WAKER: AtomicWaker = AtomicWaker::new();
21 21
22impl<'d> Temp<'d> { 22impl<'d> Temp<'d> {
23 /// Create a new temperature sensor driver.
23 pub fn new(_t: impl Peripheral<P = TEMP> + 'd, irq: impl Peripheral<P = interrupt::TEMP> + 'd) -> Self { 24 pub fn new(_t: impl Peripheral<P = TEMP> + 'd, irq: impl Peripheral<P = interrupt::TEMP> + 'd) -> Self {
24 into_ref!(_t, irq); 25 into_ref!(_t, irq);
25 26