rename register blocks
Some checks failed
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled

This commit is contained in:
Robin Mueller
2025-10-18 23:24:36 +02:00
parent 709f9555ef
commit c53b6ae2bb
48 changed files with 271 additions and 261 deletions

View File

@@ -145,7 +145,7 @@ pub struct EventCount {
/// Triple-timer counter register access.
#[derive(derive_mmio::Mmio)]
#[repr(C)]
pub struct Ttc {
pub struct Registers {
clk_cntr: [ClockControl; 3],
cnt_ctrl: [CounterControl; 3],
#[mmio(PureRead)]
@@ -162,9 +162,9 @@ pub struct Ttc {
event_reg: [EventCount; 3],
}
static_assertions::const_assert_eq!(core::mem::size_of::<Ttc>(), 0x84);
static_assertions::const_assert_eq!(core::mem::size_of::<Registers>(), 0x84);
impl Ttc {
impl Registers {
/// Create a new TTC MMIO instance for TTC0 at address [TTC_0_BASE_ADDR].
///
/// # Safety
@@ -172,7 +172,7 @@ impl Ttc {
/// This API can be used to potentially create a driver to the same peripheral structure
/// from multiple threads. The user must ensure that concurrent accesses are safe and do not
/// interfere with each other.
pub const unsafe fn new_mmio_fixed_0() -> MmioTtc<'static> {
pub const unsafe fn new_mmio_fixed_0() -> MmioRegisters<'static> {
unsafe { Self::new_mmio_at(TTC_0_BASE_ADDR) }
}
@@ -183,7 +183,7 @@ impl Ttc {
/// This API can be used to potentially create a driver to the same peripheral structure
/// from multiple threads. The user must ensure that concurrent accesses are safe and do not
/// interfere with each other.
pub const unsafe fn new_mmio_fixed_1() -> MmioTtc<'static> {
pub const unsafe fn new_mmio_fixed_1() -> MmioRegisters<'static> {
unsafe { Self::new_mmio_at(TTC_1_BASE_ADDR) }
}
}