nxp-pac

Crates

git

Versions

mcxa537

Flavors

MacVlanTag

Struct MacVlanTag 

Source
#[repr(transparent)]
pub struct MacVlanTag(pub u32);
Expand description

F70RM Rev. 1 section 51.7.1.6; manual text line 149146.

Tuple Fields§

§0: u32

Implementations§

Source§

impl MacVlanTag

Source

pub const fn vl(&self) -> u16

VLAN Tag Identifier for Receive Packets. This field contains the 802.1Q VLAN tag to identify the VLAN packets. This VLAN tag identifier is compared to the 15th and 16th bytes of the packets being received for VLAN packets. The following list describes the bits of this field: - Bits[15:13]: User Priority - Bit 12: Canonical Format Indicator (CFI) or Drop Eligible Indicator (DEI) - Bits[11:0]: VLAN Identifier (VID) field of VLAN tag When the ETV bit is set, only the VID is used for comparison. If this field ([11:0] if ETV is set) is all zeros, the MAC does not check the 15th and 16th bytes for VLAN tag comparison and declares all packets with Type field value of 0x8100 or 0x88a8 as VLAN packets.

Source

pub const fn set_vl(&mut self, val: u16)

VLAN Tag Identifier for Receive Packets. This field contains the 802.1Q VLAN tag to identify the VLAN packets. This VLAN tag identifier is compared to the 15th and 16th bytes of the packets being received for VLAN packets. The following list describes the bits of this field: - Bits[15:13]: User Priority - Bit 12: Canonical Format Indicator (CFI) or Drop Eligible Indicator (DEI) - Bits[11:0]: VLAN Identifier (VID) field of VLAN tag When the ETV bit is set, only the VID is used for comparison. If this field ([11:0] if ETV is set) is all zeros, the MAC does not check the 15th and 16th bytes for VLAN tag comparison and declares all packets with Type field value of 0x8100 or 0x88a8 as VLAN packets.

Source

pub const fn etv(&self) -> bool

Enable 12-Bit VLAN Tag Comparison. - 1: A 12-bit VLAN identifier is used for comparing and filtering instead of the complete 16-bit VLAN tag. Bits[11:0] of the VLAN tag are compared with the corresponding field in the received VLAN-tagged packet. Similarly, when enabled, only 12 bits of the VLAN tag in the received packet are used for hash-based VLAN filtering. - 0: All 16 bits of the 15th and 16th bytes of the received VLAN packet are used for comparison and VLAN hash filtering. 0b - 12-Bit VLAN Tag Comparison is disabled 1b - 12-Bit VLAN Tag Comparison is enabled

Source

pub const fn set_etv(&mut self, val: bool)

Enable 12-Bit VLAN Tag Comparison. - 1: A 12-bit VLAN identifier is used for comparing and filtering instead of the complete 16-bit VLAN tag. Bits[11:0] of the VLAN tag are compared with the corresponding field in the received VLAN-tagged packet. Similarly, when enabled, only 12 bits of the VLAN tag in the received packet are used for hash-based VLAN filtering. - 0: All 16 bits of the 15th and 16th bytes of the received VLAN packet are used for comparison and VLAN hash filtering. 0b - 12-Bit VLAN Tag Comparison is disabled 1b - 12-Bit VLAN Tag Comparison is enabled

Source

pub const fn vtim(&self) -> bool

VLAN Tag Inverse Match Enable. - 1: Enables the VLAN Tag inverse matching. The packets without matching VLAN Tag are marked as matched. - 0: Enables the VLAN Tag perfect matching. The packets with matched VLAN Tag are marked as matched. 0b - VLAN Tag Inverse Match is disabled 1b - VLAN Tag Inverse Match is enabled

Source

pub const fn set_vtim(&mut self, val: bool)

VLAN Tag Inverse Match Enable. - 1: Enables the VLAN Tag inverse matching. The packets without matching VLAN Tag are marked as matched. - 0: Enables the VLAN Tag perfect matching. The packets with matched VLAN Tag are marked as matched. 0b - VLAN Tag Inverse Match is disabled 1b - VLAN Tag Inverse Match is enabled

Source

pub const fn esvl(&self) -> bool

Enable S-VLAN. - 1: MAC transmitter and receiver consider the S-VLAN packets (Type = 0x88A8) as valid VLAN tagged packets. 0b - S-VLAN is disabled 1b - S-VLAN is enabled

Source

pub const fn set_esvl(&mut self, val: bool)

Enable S-VLAN. - 1: MAC transmitter and receiver consider the S-VLAN packets (Type = 0x88A8) as valid VLAN tagged packets. 0b - S-VLAN is disabled 1b - S-VLAN is enabled

Source

pub const fn ersvlm(&self) -> bool

Enable Receive S-VLAN Match. - 1: MAC receiver enables filtering or matching for S-VLAN (Type = 0x88A8) packets. - 0: MAC receiver enables filtering or matching for C-VLAN (Type = 0x8100) packets. The ERIVLT bit determines the VLAN tag position considered for filtering or matching. 0b - Receive S-VLAN Match is disabled 1b - Receive S-VLAN Match is enabled

Source

pub const fn set_ersvlm(&mut self, val: bool)

Enable Receive S-VLAN Match. - 1: MAC receiver enables filtering or matching for S-VLAN (Type = 0x88A8) packets. - 0: MAC receiver enables filtering or matching for C-VLAN (Type = 0x8100) packets. The ERIVLT bit determines the VLAN tag position considered for filtering or matching. 0b - Receive S-VLAN Match is disabled 1b - Receive S-VLAN Match is enabled

Source

pub const fn dovltc(&self) -> bool

Disable VLAN Type Check. - 1: MAC does not check whether the VLAN Tag specified by the ERIVLT bit is of type S-VLAN or C-VLAN. - 0: MAC filters or matches the VLAN Tag specified by the ERIVLT bit only when VLAN Tag type is similar to the one specified by the ERSVLM bit. The VLAN filter is bypassed when VLAN Type of received packet do not match the programmed VLAN Type in the VLAN filter. 0b - VLAN Type Check is enabled 1b - VLAN Type Check is disabled

Source

pub const fn set_dovltc(&mut self, val: bool)

Disable VLAN Type Check. - 1: MAC does not check whether the VLAN Tag specified by the ERIVLT bit is of type S-VLAN or C-VLAN. - 0: MAC filters or matches the VLAN Tag specified by the ERIVLT bit only when VLAN Tag type is similar to the one specified by the ERSVLM bit. The VLAN filter is bypassed when VLAN Type of received packet do not match the programmed VLAN Type in the VLAN filter. 0b - VLAN Type Check is enabled 1b - VLAN Type Check is disabled

Source

pub const fn evls(&self) -> u8

Enable VLAN Tag Stripping on Receive. This field indicates the stripping operation on the outer VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip

Source

pub const fn set_evls(&mut self, val: u8)

Enable VLAN Tag Stripping on Receive. This field indicates the stripping operation on the outer VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip

Source

pub const fn evlrxs(&self) -> bool

Enable VLAN Tag in Rx status. - 1: MAC provides the outer VLAN Tag in the Rx status. - 0: MAC does not provide the outer VLAN Tag in Rx status. 0b - VLAN Tag in Rx status is disabled 1b - VLAN Tag in Rx status is enabled

Source

pub const fn set_evlrxs(&mut self, val: bool)

Enable VLAN Tag in Rx status. - 1: MAC provides the outer VLAN Tag in the Rx status. - 0: MAC does not provide the outer VLAN Tag in Rx status. 0b - VLAN Tag in Rx status is disabled 1b - VLAN Tag in Rx status is enabled

Source

pub const fn edvlp(&self) -> bool

Enable Double VLAN Processing. - 1: MAC enables processing of up to two VLAN Tags on Tx and Rx (if present). - 0: MAC enables processing of up to one VLAN Tag on Tx and Rx (if present). 0b - Double VLAN Processing is disabled 1b - Double VLAN Processing is enabled

Source

pub const fn set_edvlp(&mut self, val: bool)

Enable Double VLAN Processing. - 1: MAC enables processing of up to two VLAN Tags on Tx and Rx (if present). - 0: MAC enables processing of up to one VLAN Tag on Tx and Rx (if present). 0b - Double VLAN Processing is disabled 1b - Double VLAN Processing is enabled

Source

pub const fn erivlt(&self) -> bool

Enable Inner VLAN Tag. When this bit and the EDVLP field are set, the MAC receiver enables operation on the inner VLAN Tag (if present). When this bit is reset, the MAC receiver enables operation on the outer VLAN Tag (if present). The ERSVLM bit determines which VLAN type is enabled for filtering or matching. 0b - Inner VLAN tag is disabled 1b - Inner VLAN tag is enabled

Source

pub const fn set_erivlt(&mut self, val: bool)

Enable Inner VLAN Tag. When this bit and the EDVLP field are set, the MAC receiver enables operation on the inner VLAN Tag (if present). When this bit is reset, the MAC receiver enables operation on the outer VLAN Tag (if present). The ERSVLM bit determines which VLAN type is enabled for filtering or matching. 0b - Inner VLAN tag is disabled 1b - Inner VLAN tag is enabled

Source

pub const fn eivls(&self) -> u8

Enable Inner VLAN Tag Stripping on Receive. This field indicates the stripping operation on inner VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip

Source

pub const fn set_eivls(&mut self, val: u8)

Enable Inner VLAN Tag Stripping on Receive. This field indicates the stripping operation on inner VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip

Source

pub const fn eivlrxs(&self) -> bool

Enable Inner VLAN Tag in Rx Status. - 1: MAC provides the inner VLAN Tag in the Rx status. - 0: MAC does not provide the inner VLAN Tag in the Rx status. 0b - Inner VLAN Tag in Rx status is disabled 1b - Inner VLAN Tag in Rx status is enabled

Source

pub const fn set_eivlrxs(&mut self, val: bool)

Enable Inner VLAN Tag in Rx Status. - 1: MAC provides the inner VLAN Tag in the Rx status. - 0: MAC does not provide the inner VLAN Tag in the Rx status. 0b - Inner VLAN Tag in Rx status is disabled 1b - Inner VLAN Tag in Rx status is enabled

Trait Implementations§

Source§

impl Clone for MacVlanTag

Source§

fn clone(&self) -> MacVlanTag

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MacVlanTag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MacVlanTag

Source§

fn default() -> MacVlanTag

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MacVlanTag

Source§

fn eq(&self, other: &MacVlanTag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for MacVlanTag

Source§

impl Eq for MacVlanTag

Source§

impl StructuralPartialEq for MacVlanTag

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.