Skip to content

Commit

Permalink
feat: updating from newer svd2rust (#51)
Browse files Browse the repository at this point in the history
Co-authored-by: lucasbrendel <lucasbrendel@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 26, 2023
1 parent d024b68 commit 22c592e
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 1,534 deletions.
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

0 comments on commit 22c592e

Please sign in to comment.