Skip to content

Commit

Permalink
A little more Doorbell renaming (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsohn authored Dec 10, 2023
1 parent b982941 commit ae72434
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 5 additions & 9 deletions src/registers/doorbell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use super::capability::Capability;
use accessor::array;
use accessor::Mapper;
use core::{convert::TryFrom, fmt};
use core::convert::TryFrom;

/// A type alias to [`Doorbell`] register for backward compability.
#[deprecated = "Use `Doorbell` instead of `Register`."]
Expand Down Expand Up @@ -48,11 +48,7 @@ impl Doorbell {
rw_field!(0..=7, doorbell_target, "Doorbell Target", u8);
rw_field!(16..=31, doorbell_stream_id, "Doorbell Stream ID", u16);
}
impl fmt::Debug for Doorbell {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("doorbell::Register")
.field("doorbell_target", &self.doorbell_target())
.field("doorbell_stream_id", &self.doorbell_stream_id())
.finish()
}
}
impl_debug_from_methods!(Doorbell {
doorbell_target,
doorbell_stream_id,
});
3 changes: 2 additions & 1 deletion src/registers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use accessor::array;
use accessor::Mapper;

pub use capability::Capability;
pub use doorbell::Doorbell;
pub use operational::{Operational, PortRegisterSet};
pub use runtime::InterrupterRegisterSet;
pub use runtime::Runtime;
Expand All @@ -22,7 +23,7 @@ where
/// Host Controller Capability Register
pub capability: Capability<M>,
/// Doorbell Array
pub doorbell: array::ReadWrite<doorbell::Doorbell, M>,
pub doorbell: array::ReadWrite<Doorbell, M>,
/// Host Controller Operational Register
pub operational: Operational<M>,
/// Port Register Set Array
Expand Down

0 comments on commit ae72434

Please sign in to comment.