Skip to content

Commit

Permalink
feat: updating from newer svd2rust (#55)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
  • Loading branch information
xmc-action-bot[bot] and kodiakhq authored Dec 1, 2023
1 parent c2f6389 commit 29edbaf
Show file tree
Hide file tree
Showing 7 changed files with 100 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 29edbaf

Please sign in to comment.