Skip to content

Commit ae72434

Browse files
authored
A little more Doorbell renaming (#170)
1 parent b982941 commit ae72434

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/registers/doorbell.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use super::capability::Capability;
44
use accessor::array;
55
use accessor::Mapper;
6-
use core::{convert::TryFrom, fmt};
6+
use core::convert::TryFrom;
77

88
/// A type alias to [`Doorbell`] register for backward compability.
99
#[deprecated = "Use `Doorbell` instead of `Register`."]
@@ -48,11 +48,7 @@ impl Doorbell {
4848
rw_field!(0..=7, doorbell_target, "Doorbell Target", u8);
4949
rw_field!(16..=31, doorbell_stream_id, "Doorbell Stream ID", u16);
5050
}
51-
impl fmt::Debug for Doorbell {
52-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
53-
f.debug_struct("doorbell::Register")
54-
.field("doorbell_target", &self.doorbell_target())
55-
.field("doorbell_stream_id", &self.doorbell_stream_id())
56-
.finish()
57-
}
58-
}
51+
impl_debug_from_methods!(Doorbell {
52+
doorbell_target,
53+
doorbell_stream_id,
54+
});

src/registers/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use accessor::array;
44
use accessor::Mapper;
55

66
pub use capability::Capability;
7+
pub use doorbell::Doorbell;
78
pub use operational::{Operational, PortRegisterSet};
89
pub use runtime::InterrupterRegisterSet;
910
pub use runtime::Runtime;
@@ -22,7 +23,7 @@ where
2223
/// Host Controller Capability Register
2324
pub capability: Capability<M>,
2425
/// Doorbell Array
25-
pub doorbell: array::ReadWrite<doorbell::Doorbell, M>,
26+
pub doorbell: array::ReadWrite<Doorbell, M>,
2627
/// Host Controller Operational Register
2728
pub operational: Operational<M>,
2829
/// Port Register Set Array

0 commit comments

Comments
 (0)