aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alex Martens <alexmgit@protonmail.com> 2021-08-05 21:17:00 -0700
committerGravatar Alex Martens <alexmgit@protonmail.com> 2021-08-05 21:17:00 -0700
commit9ddc44c595a611e3da51a90453c19ad83fdf2bfb (patch)
tree638383f33cefd9c5be0bc94a2ad51987106fd141
parentea91f18004a408f763a7d11532cdc7e14c62d80c (diff)
downloadcortex-m-9ddc44c595a611e3da51a90453c19ad83fdf2bfb.tar.gz
cortex-m-9ddc44c595a611e3da51a90453c19ad83fdf2bfb.tar.zst
cortex-m-9ddc44c595a611e3da51a90453c19ad83fdf2bfb.zip
Fix slightly misleading examples.
-rw-r--r--src/peripheral/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs
index 961f31d..8155a8f 100644
--- a/src/peripheral/mod.rs
+++ b/src/peripheral/mod.rs
@@ -10,7 +10,7 @@
//! ``` no_run
//! # use cortex_m::peripheral::Peripherals;
//! let mut peripherals = Peripherals::take().unwrap();
-//! peripherals.DWT.enable_cycle_counter();
+//! peripherals.DCB.enable_trace();
//! ```
//!
//! This method can only be successfully called *once* -- this is why the method returns an
@@ -29,6 +29,7 @@
//! # use cortex_m::peripheral::{DWT, Peripherals};
//! {
//! let mut peripherals = Peripherals::take().unwrap();
+//! peripherals.DCB.enable_trace();
//! peripherals.DWT.enable_cycle_counter();
//! } // all the peripheral singletons are destroyed here
//!
@@ -44,6 +45,7 @@
//! # use cortex_m::peripheral::{DWT, Peripherals};
//! {
//! let mut peripherals = Peripherals::take().unwrap();
+//! peripherals.DCB.enable_trace();
//! peripherals.DWT.enable_cycle_counter();
//! } // all the peripheral singletons are destroyed here
//!