atsamd51g/
evsys.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    ctrla: Ctrla,
5    _reserved1: [u8; 0x03],
6    swevt: Swevt,
7    prictrl: Prictrl,
8    _reserved3: [u8; 0x07],
9    intpend: Intpend,
10    _reserved4: [u8; 0x02],
11    intstatus: Intstatus,
12    busych: Busych,
13    readyusr: Readyusr,
14    channels: [Channels; 32],
15    user: [User; 67],
16}
17impl RegisterBlock {
18    #[doc = "0x00 - Control"]
19    #[inline(always)]
20    pub const fn ctrla(&self) -> &Ctrla {
21        &self.ctrla
22    }
23    #[doc = "0x04 - Software Event"]
24    #[inline(always)]
25    pub const fn swevt(&self) -> &Swevt {
26        &self.swevt
27    }
28    #[doc = "0x08 - Priority Control"]
29    #[inline(always)]
30    pub const fn prictrl(&self) -> &Prictrl {
31        &self.prictrl
32    }
33    #[doc = "0x10 - Channel Pending Interrupt"]
34    #[inline(always)]
35    pub const fn intpend(&self) -> &Intpend {
36        &self.intpend
37    }
38    #[doc = "0x14 - Interrupt Status"]
39    #[inline(always)]
40    pub const fn intstatus(&self) -> &Intstatus {
41        &self.intstatus
42    }
43    #[doc = "0x18 - Busy Channels"]
44    #[inline(always)]
45    pub const fn busych(&self) -> &Busych {
46        &self.busych
47    }
48    #[doc = "0x1c - Ready Users"]
49    #[inline(always)]
50    pub const fn readyusr(&self) -> &Readyusr {
51        &self.readyusr
52    }
53    #[doc = "0x20..0x120 - CHANNELS\\[%s\\]"]
54    #[inline(always)]
55    pub const fn channels(&self, n: usize) -> &Channels {
56        &self.channels[n]
57    }
58    #[doc = "Iterator for array of:"]
59    #[doc = "0x20..0x120 - CHANNELS\\[%s\\]"]
60    #[inline(always)]
61    pub fn channels_iter(&self) -> impl Iterator<Item = &Channels> {
62        self.channels.iter()
63    }
64    #[doc = "0x120..0x22c - User Multiplexer n"]
65    #[inline(always)]
66    pub const fn user(&self, n: usize) -> &User {
67        &self.user[n]
68    }
69    #[doc = "Iterator for array of:"]
70    #[doc = "0x120..0x22c - User Multiplexer n"]
71    #[inline(always)]
72    pub fn user_iter(&self) -> impl Iterator<Item = &User> {
73        self.user.iter()
74    }
75}
76#[doc = "CTRLA (rw) register accessor: Control\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrla::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrla`]
77module"]
78#[doc(alias = "CTRLA")]
79pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
80#[doc = "Control"]
81pub mod ctrla;
82#[doc = "SWEVT (w) register accessor: Software Event\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`swevt::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@swevt`]
83module"]
84#[doc(alias = "SWEVT")]
85pub type Swevt = crate::Reg<swevt::SwevtSpec>;
86#[doc = "Software Event"]
87pub mod swevt;
88#[doc = "PRICTRL (rw) register accessor: Priority Control\n\nYou can [`read`](crate::Reg::read) this register and get [`prictrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prictrl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@prictrl`]
89module"]
90#[doc(alias = "PRICTRL")]
91pub type Prictrl = crate::Reg<prictrl::PrictrlSpec>;
92#[doc = "Priority Control"]
93pub mod prictrl;
94#[doc = "INTPEND (rw) register accessor: Channel Pending Interrupt\n\nYou can [`read`](crate::Reg::read) this register and get [`intpend::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intpend::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intpend`]
95module"]
96#[doc(alias = "INTPEND")]
97pub type Intpend = crate::Reg<intpend::IntpendSpec>;
98#[doc = "Channel Pending Interrupt"]
99pub mod intpend;
100#[doc = "INTSTATUS (r) register accessor: Interrupt Status\n\nYou can [`read`](crate::Reg::read) this register and get [`intstatus::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intstatus`]
101module"]
102#[doc(alias = "INTSTATUS")]
103pub type Intstatus = crate::Reg<intstatus::IntstatusSpec>;
104#[doc = "Interrupt Status"]
105pub mod intstatus;
106#[doc = "BUSYCH (r) register accessor: Busy Channels\n\nYou can [`read`](crate::Reg::read) this register and get [`busych::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@busych`]
107module"]
108#[doc(alias = "BUSYCH")]
109pub type Busych = crate::Reg<busych::BusychSpec>;
110#[doc = "Busy Channels"]
111pub mod busych;
112#[doc = "READYUSR (r) register accessor: Ready Users\n\nYou can [`read`](crate::Reg::read) this register and get [`readyusr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@readyusr`]
113module"]
114#[doc(alias = "READYUSR")]
115pub type Readyusr = crate::Reg<readyusr::ReadyusrSpec>;
116#[doc = "Ready Users"]
117pub mod readyusr;
118#[doc = "CHANNELS\\[%s\\]"]
119pub use self::channels::Channels;
120#[doc = r"Cluster"]
121#[doc = "CHANNELS\\[%s\\]"]
122pub mod channels;
123#[doc = "USER (rw) register accessor: User Multiplexer n\n\nYou can [`read`](crate::Reg::read) this register and get [`user::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`user::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@user`]
124module"]
125#[doc(alias = "USER")]
126pub type User = crate::Reg<user::UserSpec>;
127#[doc = "User Multiplexer n"]
128pub mod user;