diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-02-01 00:48:33 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-02-01 01:17:41 +0100 |
| commit | b5cf332cc076a0de11ce6a0563a2235c9e57eb5c (patch) | |
| tree | ce14e014dfbe8c3764040d7f9f1ffee84ab5747b /embassy-nrf/src/temp.rs | |
| parent | ca10fe7135d10084e38038f3cd433da39e505bea (diff) | |
nrf: docs.
Diffstat (limited to 'embassy-nrf/src/temp.rs')
| -rw-r--r-- | embassy-nrf/src/temp.rs | 5 |
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 | ||
| 3 | use core::future::poll_fn; | 3 | use core::future::poll_fn; |
| 4 | use core::task::Poll; | 4 | use core::task::Poll; |
| @@ -12,7 +12,7 @@ use crate::interrupt::InterruptExt; | |||
| 12 | use crate::peripherals::TEMP; | 12 | use crate::peripherals::TEMP; |
| 13 | use crate::{interrupt, pac, Peripheral}; | 13 | use crate::{interrupt, pac, Peripheral}; |
| 14 | 14 | ||
| 15 | /// Integrated temperature sensor. | 15 | /// Builtin temperature sensor driver. |
| 16 | pub struct Temp<'d> { | 16 | pub 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> { | |||
| 20 | static WAKER: AtomicWaker = AtomicWaker::new(); | 20 | static WAKER: AtomicWaker = AtomicWaker::new(); |
| 21 | 21 | ||
| 22 | impl<'d> Temp<'d> { | 22 | impl<'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 | ||
