Adding safety docs

This commit is contained in:
Ryan Summers 2021-02-09 14:37:49 +01:00
parent 2e358dea26
commit 724768a72e
1 changed files with 2 additions and 0 deletions

View File

@ -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));
}