atsamd51p/dmac/
channel.rs

1#[repr(C)]
2#[doc = "CHANNEL\\[%s\\]"]
3#[doc(alias = "CHANNEL")]
4pub struct Channel {
5    chctrla: Chctrla,
6    chctrlb: Chctrlb,
7    chprilvl: Chprilvl,
8    chevctrl: Chevctrl,
9    _reserved4: [u8; 0x05],
10    chintenclr: Chintenclr,
11    chintenset: Chintenset,
12    chintflag: Chintflag,
13    chstatus: Chstatus,
14}
15impl Channel {
16    #[doc = "0x00 - Channel n Control A"]
17    #[inline(always)]
18    pub const fn chctrla(&self) -> &Chctrla {
19        &self.chctrla
20    }
21    #[doc = "0x04 - Channel n Control B"]
22    #[inline(always)]
23    pub const fn chctrlb(&self) -> &Chctrlb {
24        &self.chctrlb
25    }
26    #[doc = "0x05 - Channel n Priority Level"]
27    #[inline(always)]
28    pub const fn chprilvl(&self) -> &Chprilvl {
29        &self.chprilvl
30    }
31    #[doc = "0x06 - Channel n Event Control"]
32    #[inline(always)]
33    pub const fn chevctrl(&self) -> &Chevctrl {
34        &self.chevctrl
35    }
36    #[doc = "0x0c - Channel n Interrupt Enable Clear"]
37    #[inline(always)]
38    pub const fn chintenclr(&self) -> &Chintenclr {
39        &self.chintenclr
40    }
41    #[doc = "0x0d - Channel n Interrupt Enable Set"]
42    #[inline(always)]
43    pub const fn chintenset(&self) -> &Chintenset {
44        &self.chintenset
45    }
46    #[doc = "0x0e - Channel n Interrupt Flag Status and Clear"]
47    #[inline(always)]
48    pub const fn chintflag(&self) -> &Chintflag {
49        &self.chintflag
50    }
51    #[doc = "0x0f - Channel n Status"]
52    #[inline(always)]
53    pub const fn chstatus(&self) -> &Chstatus {
54        &self.chstatus
55    }
56}
57#[doc = "CHCTRLA (rw) register accessor: Channel n Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`chctrla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chctrla::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@chctrla`]
58module"]
59#[doc(alias = "CHCTRLA")]
60pub type Chctrla = crate::Reg<chctrla::ChctrlaSpec>;
61#[doc = "Channel n Control A"]
62pub mod chctrla;
63#[doc = "CHCTRLB (rw) register accessor: Channel n Control B\n\nYou can [`read`](crate::Reg::read) this register and get [`chctrlb::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chctrlb::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@chctrlb`]
64module"]
65#[doc(alias = "CHCTRLB")]
66pub type Chctrlb = crate::Reg<chctrlb::ChctrlbSpec>;
67#[doc = "Channel n Control B"]
68pub mod chctrlb;
69#[doc = "CHPRILVL (rw) register accessor: Channel n Priority Level\n\nYou can [`read`](crate::Reg::read) this register and get [`chprilvl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chprilvl::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@chprilvl`]
70module"]
71#[doc(alias = "CHPRILVL")]
72pub type Chprilvl = crate::Reg<chprilvl::ChprilvlSpec>;
73#[doc = "Channel n Priority Level"]
74pub mod chprilvl;
75#[doc = "CHEVCTRL (rw) register accessor: Channel n Event Control\n\nYou can [`read`](crate::Reg::read) this register and get [`chevctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chevctrl::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@chevctrl`]
76module"]
77#[doc(alias = "CHEVCTRL")]
78pub type Chevctrl = crate::Reg<chevctrl::ChevctrlSpec>;
79#[doc = "Channel n Event Control"]
80pub mod chevctrl;
81#[doc = "CHINTENCLR (rw) register accessor: Channel n Interrupt Enable Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`chintenclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chintenclr::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@chintenclr`]
82module"]
83#[doc(alias = "CHINTENCLR")]
84pub type Chintenclr = crate::Reg<chintenclr::ChintenclrSpec>;
85#[doc = "Channel n Interrupt Enable Clear"]
86pub mod chintenclr;
87#[doc = "CHINTENSET (rw) register accessor: Channel n Interrupt Enable Set\n\nYou can [`read`](crate::Reg::read) this register and get [`chintenset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chintenset::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@chintenset`]
88module"]
89#[doc(alias = "CHINTENSET")]
90pub type Chintenset = crate::Reg<chintenset::ChintensetSpec>;
91#[doc = "Channel n Interrupt Enable Set"]
92pub mod chintenset;
93#[doc = "CHINTFLAG (rw) register accessor: Channel n Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`chintflag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chintflag::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@chintflag`]
94module"]
95#[doc(alias = "CHINTFLAG")]
96pub type Chintflag = crate::Reg<chintflag::ChintflagSpec>;
97#[doc = "Channel n Interrupt Flag Status and Clear"]
98pub mod chintflag;
99#[doc = "CHSTATUS (rw) register accessor: Channel n Status\n\nYou can [`read`](crate::Reg::read) this register and get [`chstatus::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`chstatus::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@chstatus`]
100module"]
101#[doc(alias = "CHSTATUS")]
102pub type Chstatus = crate::Reg<chstatus::ChstatusSpec>;
103#[doc = "Channel n Status"]
104pub mod chstatus;