Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A little more Doorbell renaming #170

Merged
merged 7 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading