add deprecation for old names

This commit is contained in:
Corwin 2023-04-23 20:41:42 +01:00
parent b75481b88e
commit 94a8e2d4c3
No known key found for this signature in database
2 changed files with 12 additions and 0 deletions

View file

@ -92,6 +92,13 @@ impl ObjectDistribution {
unsafe { initilise_oam() };
OamManaged::new()
}
/// The old name for [`get_managed`][ObjectDistribution::get_managed] kept around for easier migration.
/// This will be removed in a future release.
#[deprecated = "use get_managed to get the managed oam instead"]
pub fn get(&mut self) -> OamManaged<'_> {
self.get_managed()
}
}
#[non_exhaustive]

View file

@ -26,6 +26,11 @@ use super::DISPLAY_CONTROL;
const OBJECT_ATTRIBUTE_MEMORY: *mut u16 = 0x0700_0000 as *mut u16;
#[deprecated = "use OamManaged directly instead"]
/// The old name for [`OamManaged`] kept around for easier migration.
/// This will be removed in a future release.
pub type ObjectController<'a> = OamManaged<'a>;
pub(super) unsafe fn initilise_oam() {
for i in 0..128 {
let ptr = (OBJECT_ATTRIBUTE_MEMORY).add(i * 4);