regenerate svd files for other targets

This commit is contained in:
bunnie 2024-06-06 18:07:08 +08:00
parent 2e2d4d423c
commit 529cdcc67d
2 changed files with 8 additions and 0 deletions

View file

@ -46,6 +46,7 @@ impl Field {
} }
pub const fn offset(&self) -> usize { self.offset } pub const fn offset(&self) -> usize { self.offset }
pub const fn mask(&self) -> usize { self.mask } pub const fn mask(&self) -> usize { self.mask }
pub const fn register(&self) -> Register { self.register }
} }
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct CSR<T> { pub struct CSR<T> {
@ -160,6 +161,9 @@ where
base: Arc::new(AtomicPtr::new(base)) base: Arc::new(AtomicPtr::new(base))
} }
} }
pub unsafe fn base(&self) -> *mut T {
self.base.load(core::sync::atomic::Ordering::SeqCst) as *mut T
}
pub fn clone(&self) -> Self { pub fn clone(&self) -> Self {
AtomicCsr { AtomicCsr {
base: self.base.clone() base: self.base.clone()

View file

@ -46,6 +46,7 @@ impl Field {
} }
pub const fn offset(&self) -> usize { self.offset } pub const fn offset(&self) -> usize { self.offset }
pub const fn mask(&self) -> usize { self.mask } pub const fn mask(&self) -> usize { self.mask }
pub const fn register(&self) -> Register { self.register }
} }
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct CSR<T> { pub struct CSR<T> {
@ -160,6 +161,9 @@ where
base: Arc::new(AtomicPtr::new(base)) base: Arc::new(AtomicPtr::new(base))
} }
} }
pub unsafe fn base(&self) -> *mut T {
self.base.load(core::sync::atomic::Ordering::SeqCst) as *mut T
}
pub fn clone(&self) -> Self { pub fn clone(&self) -> Self {
AtomicCsr { AtomicCsr {
base: self.base.clone() base: self.base.clone()