jh71xx_pac/gmac0/
pcs.rs

1#[repr(C)]
2#[doc = "PCS (AN/TBI/SGMII/RGMII) registers"]
3#[doc(alias = "pcs")]
4pub struct Pcs {
5    an_ctrl: AnCtrl,
6    an_status: AnStatus,
7    ane: [Ane; 2],
8    ane_exp: AneExp,
9    tbi: Tbi,
10}
11impl Pcs {
12    #[doc = "0x00 - Auto-Negotiation Control"]
13    #[inline(always)]
14    pub const fn an_ctrl(&self) -> &AnCtrl {
15        &self.an_ctrl
16    }
17    #[doc = "0x04 - Auto-Negotiation Status"]
18    #[inline(always)]
19    pub const fn an_status(&self) -> &AnStatus {
20        &self.an_status
21    }
22    #[doc = "0x08..0x10 - Auto-Negotiation Extend Advertisement and Link Partner Ability"]
23    #[doc = ""]
24    #[doc = "<div class=\"warning\">`n` is the index of register in the array. `n == 0` corresponds to `ane_adv` register.</div>"]
25    #[inline(always)]
26    pub const fn ane(&self, n: usize) -> &Ane {
27        &self.ane[n]
28    }
29    #[doc = "Iterator for array of:"]
30    #[doc = "0x08..0x10 - Auto-Negotiation Extend Advertisement and Link Partner Ability"]
31    #[inline(always)]
32    pub fn ane_iter(&self) -> impl Iterator<Item = &Ane> {
33        self.ane.iter()
34    }
35    #[doc = "0x08 - Auto-Negotiation Extend Advertisement and Link Partner Ability"]
36    #[inline(always)]
37    pub const fn ane_adv(&self) -> &Ane {
38        self.ane(0)
39    }
40    #[doc = "0x0c - Auto-Negotiation Extend Advertisement and Link Partner Ability"]
41    #[inline(always)]
42    pub const fn ane_lpa(&self) -> &Ane {
43        self.ane(1)
44    }
45    #[doc = "0x10 - Auto-Negotiation Extend Expansion"]
46    #[inline(always)]
47    pub const fn ane_exp(&self) -> &AneExp {
48        &self.ane_exp
49    }
50    #[doc = "0x14 - TBI Extend Status"]
51    #[inline(always)]
52    pub const fn tbi(&self) -> &Tbi {
53        &self.tbi
54    }
55}
56#[doc = "an_ctrl (rw) register accessor: Auto-Negotiation Control\n\nYou can [`read`](crate::Reg::read) this register and get [`an_ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`an_ctrl::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@an_ctrl`]
57module"]
58#[doc(alias = "an_ctrl")]
59pub type AnCtrl = crate::Reg<an_ctrl::AnCtrlSpec>;
60#[doc = "Auto-Negotiation Control"]
61pub mod an_ctrl;
62#[doc = "an_status (rw) register accessor: Auto-Negotiation Status\n\nYou can [`read`](crate::Reg::read) this register and get [`an_status::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`an_status::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@an_status`]
63module"]
64#[doc(alias = "an_status")]
65pub type AnStatus = crate::Reg<an_status::AnStatusSpec>;
66#[doc = "Auto-Negotiation Status"]
67pub mod an_status;
68#[doc = "ane (rw) register accessor: Auto-Negotiation Extend Advertisement and Link Partner Ability\n\nYou can [`read`](crate::Reg::read) this register and get [`ane::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ane::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@ane`]
69module"]
70#[doc(alias = "ane")]
71pub type Ane = crate::Reg<ane::AneSpec>;
72#[doc = "Auto-Negotiation Extend Advertisement and Link Partner Ability"]
73pub mod ane;
74#[doc = "ane_exp (rw) register accessor: Auto-Negotiation Extend Expansion\n\nYou can [`read`](crate::Reg::read) this register and get [`ane_exp::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ane_exp::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@ane_exp`]
75module"]
76#[doc(alias = "ane_exp")]
77pub type AneExp = crate::Reg<ane_exp::AneExpSpec>;
78#[doc = "Auto-Negotiation Extend Expansion"]
79pub mod ane_exp;
80#[doc = "tbi (rw) register accessor: TBI Extend Status\n\nYou can [`read`](crate::Reg::read) this register and get [`tbi::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tbi::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@tbi`]
81module"]
82#[doc(alias = "tbi")]
83pub type Tbi = crate::Reg<tbi::TbiSpec>;
84#[doc = "TBI Extend Status"]
85pub mod tbi;