From 724768a72e9ac423c8ce10ae9bf6230e64c09cc7 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Tue, 9 Feb 2021 14:37:49 +0100 Subject: [PATCH] Adding safety docs --- src/hardware/timers.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hardware/timers.rs b/src/hardware/timers.rs index fe90677..78d27b6 100644 --- a/src/hardware/timers.rs +++ b/src/hardware/timers.rs @@ -348,6 +348,8 @@ macro_rules! timer_channels { /// * `filter` - The desired input filter stage configuration. Defaults to disabled. #[allow(dead_code)] pub fn configure_filter(&mut self, filter: super::InputFilter) { + // Note(unsafe): This channel owns all access to the specific timer channel. + // Only atomic operations on completed on the timer registers. let regs = unsafe { &*<$TY>::ptr() }; regs.[< $ccmrx _input >]().modify(|_, w| w.[< ic $index f >]().bits(filter as u8)); }