aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
-rw-r--r--src/peripheral/scb.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index beaecd2..276551c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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>());