diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/peripheral/scb.rs | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -34,6 +34,8 @@ #![no_std] #![allow(clippy::identity_op)] #![allow(clippy::missing_safety_doc)] +// Prevent clippy from complaining about empty match expression that are used for cfg gating. +#![allow(clippy::match_single_binding)] // This makes clippy warn about public functions which are not #[inline]. // diff --git a/src/peripheral/scb.rs b/src/peripheral/scb.rs index dc82dc7..dfcc729 100644 --- a/src/peripheral/scb.rs +++ b/src/peripheral/scb.rs @@ -713,6 +713,7 @@ impl SCB { /// /// Cleaning the cache causes whatever data is present in the cache to be immediately written /// to main memory, overwriting whatever was in main memory. + #[inline] pub fn clean_dcache_by_ref<T>(&mut self, obj: &T) { self.clean_dcache_by_address(obj as *const T as usize, core::mem::size_of::<T>()); } @@ -729,6 +730,7 @@ impl SCB { /// /// Cleaning the cache causes whatever data is present in the cache to be immediately written /// to main memory, overwriting whatever was in main memory. + #[inline] pub fn clean_dcache_by_slice<T>(&mut self, slice: &[T]) { self.clean_dcache_by_address(slice.as_ptr() as usize, slice.len() * core::mem::size_of::<T>()); |