Skip to content

Commit 925f56e

Browse files
authored
Rename InterruptRegisterSet to InterrupterRegisterSet (#143)
1 parent 55f94d7 commit 925f56e

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

src/registers/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ use accessor::Mapper;
55

66
pub use capability::Capability;
77
pub use operational::{Operational, PortRegisterSet};
8+
#[allow(deprecated)]
89
pub use runtime::InterruptRegisterSet;
10+
pub use runtime::InterrupterRegisterSet;
911
pub use runtime::Runtime;
1012

1113
pub mod capability;
@@ -29,8 +31,9 @@ where
2931
pub port_register_set: array::ReadWrite<PortRegisterSet, M>,
3032
/// Runtime Registers
3133
pub runtime: Runtime<M>,
32-
/// Interrupt Register Set Array
33-
pub interrupt_register_set: array::ReadWrite<InterruptRegisterSet, M>,
34+
/// Interrupter Register Set Array
35+
// TODO rename to interrupter_register_set
36+
pub interrupt_register_set: array::ReadWrite<InterrupterRegisterSet, M>,
3437
}
3538
impl<M> Registers<M>
3639
where
@@ -81,7 +84,7 @@ where
8184
let port_register_set = PortRegisterSet::new(mmio_base, &capability, mapper.clone());
8285
let runtime = Runtime::new(mmio_base, capability.rtsoff.read_volatile(), mapper.clone());
8386
let interrupt_register_set =
84-
InterruptRegisterSet::new(mmio_base, capability.rtsoff.read_volatile(), mapper);
87+
InterrupterRegisterSet::new(mmio_base, capability.rtsoff.read_volatile(), mapper);
8588

8689
Self {
8790
capability,

src/registers/runtime.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use core::convert::TryInto;
99

1010
/// Runtime Registers
1111
///
12-
/// Note that this struct does not contain the interrupt register sets. Refer to
13-
/// [`InterruptRegisterSet`].
12+
/// Note that this struct does not contain the interrupter register sets. Refer to
13+
/// [`InterrupterRegisterSet`].
1414
#[derive(Debug)]
1515
pub struct Runtime<M>
1616
where
@@ -55,13 +55,13 @@ impl_debug_from_methods! {
5555
}
5656
}
5757

58-
/// Interrupt Register Set
58+
/// Interrupter Register Set
5959
#[repr(C)]
6060
#[derive(Copy, Clone, Debug)]
61-
pub struct InterruptRegisterSet {
62-
/// Interrupt Management Register
61+
pub struct InterrupterRegisterSet {
62+
/// Interrupter Management Register
6363
pub iman: InterrupterManagementRegister,
64-
/// Interrupt Moderation Register
64+
/// Interrupter Moderation Register
6565
pub imod: InterrupterModerationRegister,
6666
/// Event Ring Segment Table Size Register
6767
pub erstsz: EventRingSegmentTableSizeRegister,
@@ -71,8 +71,8 @@ pub struct InterruptRegisterSet {
7171
/// Event Ring Dequeue Pointer Register
7272
pub erdp: EventRingDequeuePointerRegister,
7373
}
74-
impl InterruptRegisterSet {
75-
/// Creates an accessor to the Interrupt Register Set.
74+
impl InterrupterRegisterSet {
75+
/// Creates an accessor to the Interrupter Register Set.
7676
///
7777
/// # Safety
7878
///
@@ -81,7 +81,7 @@ impl InterruptRegisterSet {
8181
///
8282
/// # Panics
8383
///
84-
/// This method panics if the base address of the Interrupt Register Sets is not aligned
84+
/// This method panics if the base address of the Interrupter Register Sets is not aligned
8585
/// correctly.
8686
pub unsafe fn new<M>(
8787
mmio_base: usize,
@@ -220,3 +220,7 @@ impl_debug_from_methods! {
220220
event_ring_dequeue_pointer
221221
}
222222
}
223+
224+
/// Alias for [`InterrupterRegisterSet`].
225+
#[deprecated(note = "use InterrupterRegisterSet instead (note 'er')")]
226+
pub type InterruptRegisterSet = InterrupterRegisterSet;

0 commit comments

Comments
 (0)