Skip to content

Commit

Permalink
set_bits isn't used any more
Browse files Browse the repository at this point in the history
  • Loading branch information
gwilymk committed Feb 5, 2025
1 parent 30b4158 commit a8aacf6
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions agb/src/memory_mapped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@ where
}
}

pub fn set_bits<T>(current_value: T, value: T, length: usize, shift: usize) -> T
where
T: From<u8>
+ Copy
+ ops::Shl<usize, Output = T>
+ ops::BitAnd<Output = T>
+ ops::Sub<Output = T>
+ ops::BitOr<Output = T>
+ ops::Not<Output = T>,
{
let one: T = 1u8.into();
let mask: T = (one << length) - one;
(current_value & !(mask << shift)) | ((value & mask) << shift)
}

pub struct MemoryMapped1DArray<T, const N: usize> {
array: *mut [T; N],
}
Expand Down

0 comments on commit a8aacf6

Please sign in to comment.