1#[doc = "Register `SVLAN` reader"]
2pub type R = crate::R<SvlanSpec>;
3#[doc = "Register `SVLAN` writer"]
4pub type W = crate::W<SvlanSpec>;
5#[doc = "Field `VLAN_TYPE` reader - User Defined VLAN_TYPE Field"]
6pub type VlanTypeR = crate::FieldReader<u16>;
7#[doc = "Field `VLAN_TYPE` writer - User Defined VLAN_TYPE Field"]
8pub type VlanTypeW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `ESVLAN` reader - Enable Stacked VLAN Processing Mode"]
10pub type EsvlanR = crate::BitReader;
11#[doc = "Field `ESVLAN` writer - Enable Stacked VLAN Processing Mode"]
12pub type EsvlanW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bits 0:15 - User Defined VLAN_TYPE Field"]
15 #[inline(always)]
16 pub fn vlan_type(&self) -> VlanTypeR {
17 VlanTypeR::new((self.bits & 0xffff) as u16)
18 }
19 #[doc = "Bit 31 - Enable Stacked VLAN Processing Mode"]
20 #[inline(always)]
21 pub fn esvlan(&self) -> EsvlanR {
22 EsvlanR::new(((self.bits >> 31) & 1) != 0)
23 }
24}
25impl W {
26 #[doc = "Bits 0:15 - User Defined VLAN_TYPE Field"]
27 #[inline(always)]
28 #[must_use]
29 pub fn vlan_type(&mut self) -> VlanTypeW<SvlanSpec> {
30 VlanTypeW::new(self, 0)
31 }
32 #[doc = "Bit 31 - Enable Stacked VLAN Processing Mode"]
33 #[inline(always)]
34 #[must_use]
35 pub fn esvlan(&mut self) -> EsvlanW<SvlanSpec> {
36 EsvlanW::new(self, 31)
37 }
38}
39#[doc = "Stacked VLAN Register\n\nYou can [`read`](crate::Reg::read) this register and get [`svlan::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`svlan::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct SvlanSpec;
41impl crate::RegisterSpec for SvlanSpec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`svlan::R`](R) reader structure"]
45impl crate::Readable for SvlanSpec {}
46#[doc = "`write(|w| ..)` method takes [`svlan::W`](W) writer structure"]
47impl crate::Writable for SvlanSpec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets SVLAN to value 0"]
53impl crate::Resettable for SvlanSpec {
54 const RESET_VALUE: u32 = 0;
55}