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

feat: updating from newer svd2rust #51

Merged
merged 7 commits into from
Dec 26, 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
18 changes: 18 additions & 0 deletions src/can.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,34 @@ impl RegisterBlock {
pub const fn list(&self, n: usize) -> &LIST {
&self.list[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x100..0x140 - List Register"]
#[inline(always)]
pub fn list_iter(&self) -> impl Iterator<Item = &LIST> {
self.list.iter()
}
#[doc = "0x140..0x160 - Message Pending Register"]
#[inline(always)]
pub const fn mspnd(&self, n: usize) -> &MSPND {
&self.mspnd[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x140..0x160 - Message Pending Register"]
#[inline(always)]
pub fn mspnd_iter(&self) -> impl Iterator<Item = &MSPND> {
self.mspnd.iter()
}
#[doc = "0x180..0x1a0 - Message Index Register"]
#[inline(always)]
pub const fn msid(&self, n: usize) -> &MSID {
&self.msid[n]
}
#[doc = "Iterator for array of:"]
#[doc = "0x180..0x1a0 - Message Index Register"]
#[inline(always)]
pub fn msid_iter(&self) -> impl Iterator<Item = &MSID> {
self.msid.iter()
}
#[doc = "0x1c0 - Message Index Mask Register"]
#[inline(always)]
pub const fn msimask(&self) -> &MSIMASK {
Expand Down
Loading