#[doc = "Register `DMA_OPER_MODE` reader"] pub struct R(crate::R); impl core::ops::Deref for R { type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl From> for R { #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_OPER_MODE` writer"] pub struct W(crate::W); impl core::ops::Deref for W { type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl core::ops::DerefMut for W { #[inline(always)] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } impl From> for W { #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `DT` reader - Disable Dropping of TCP/IP Checksum Error Frames"] pub struct DT_R(crate::FieldReader); impl DT_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { DT_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for DT_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `DT` writer - Disable Dropping of TCP/IP Checksum Error Frames"] pub struct DT_W<'a> { w: &'a mut W, } impl<'a> DT_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); self.w } } #[doc = "Field `RSF` reader - Receive Store and Forward"] pub struct RSF_R(crate::FieldReader); impl RSF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { RSF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RSF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RSF` writer - Receive Store and Forward"] pub struct RSF_W<'a> { w: &'a mut W, } impl<'a> RSF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); self.w } } #[doc = "Field `DFF` reader - Disable Flushing of Received Frames"] pub struct DFF_R(crate::FieldReader); impl DFF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { DFF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for DFF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `DFF` writer - Disable Flushing of Received Frames"] pub struct DFF_W<'a> { w: &'a mut W, } impl<'a> DFF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); self.w } } #[doc = "Field `TSF` reader - Transmit Store and Forward"] pub struct TSF_R(crate::FieldReader); impl TSF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { TSF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for TSF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `TSF` writer - Transmit Store and Forward"] pub struct TSF_W<'a> { w: &'a mut W, } impl<'a> TSF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); self.w } } #[doc = "Field `FTF` reader - Flush Transmit FIFO"] pub struct FTF_R(crate::FieldReader); impl FTF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { FTF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for FTF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `FTF` writer - Flush Transmit FIFO"] pub struct FTF_W<'a> { w: &'a mut W, } impl<'a> FTF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); self.w } } #[doc = "Field `TTC` reader - Transmit Threshold Control"] pub struct TTC_R(crate::FieldReader); impl TTC_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { TTC_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for TTC_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `TTC` writer - Transmit Threshold Control"] pub struct TTC_W<'a> { w: &'a mut W, } impl<'a> TTC_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x07 << 14)) | ((value as u32 & 0x07) << 14); self.w } } #[doc = "Field `ST` reader - Start or Stop Transmission Command"] pub struct ST_R(crate::FieldReader); impl ST_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { ST_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for ST_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `ST` writer - Start or Stop Transmission Command"] pub struct ST_W<'a> { w: &'a mut W, } impl<'a> ST_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); self.w } } #[doc = "Field `RFD` reader - Threshold for Deactivating Flow Control"] pub struct RFD_R(crate::FieldReader); impl RFD_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { RFD_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RFD_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RFD` writer - Threshold for Deactivating Flow Control"] pub struct RFD_W<'a> { w: &'a mut W, } impl<'a> RFD_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 11)) | ((value as u32 & 0x03) << 11); self.w } } #[doc = "Field `RFA` reader - Threshold for Activating Flow Control"] pub struct RFA_R(crate::FieldReader); impl RFA_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { RFA_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RFA_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RFA` writer - Threshold for Activating Flow Control"] pub struct RFA_W<'a> { w: &'a mut W, } impl<'a> RFA_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); self.w } } #[doc = "Field `FEF` reader - Forward Error Frames"] pub struct FEF_R(crate::FieldReader); impl FEF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { FEF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for FEF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `FEF` writer - Forward Error Frames"] pub struct FEF_W<'a> { w: &'a mut W, } impl<'a> FEF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); self.w } } #[doc = "Field `FUF` reader - Forward Undersized Good Frames"] pub struct FUF_R(crate::FieldReader); impl FUF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { FUF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for FUF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `FUF` writer - Forward Undersized Good Frames"] pub struct FUF_W<'a> { w: &'a mut W, } impl<'a> FUF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); self.w } } #[doc = "Field `DGF` reader - Drop Giant Frames"] pub struct DGF_R(crate::FieldReader); impl DGF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { DGF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for DGF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `DGF` writer - Drop Giant Frames"] pub struct DGF_W<'a> { w: &'a mut W, } impl<'a> DGF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); self.w } } #[doc = "Field `RTC` reader - Receive Threshold Control"] pub struct RTC_R(crate::FieldReader); impl RTC_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { RTC_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for RTC_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `RTC` writer - Receive Threshold Control"] pub struct RTC_W<'a> { w: &'a mut W, } impl<'a> RTC_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); self.w } } #[doc = "Field `OSF` reader - Operate on Second Frame"] pub struct OSF_R(crate::FieldReader); impl OSF_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { OSF_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for OSF_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `OSF` writer - Operate on Second Frame"] pub struct OSF_W<'a> { w: &'a mut W, } impl<'a> OSF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); self.w } } #[doc = "Field `SR` reader - Start or Stop Receive"] pub struct SR_R(crate::FieldReader); impl SR_R { #[inline(always)] pub(crate) fn new(bits: bool) -> Self { SR_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for SR_R { type Target = crate::FieldReader; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `SR` writer - Start or Stop Receive"] pub struct SR_W<'a> { w: &'a mut W, } impl<'a> SR_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); self.w } } impl R { #[doc = "Bit 26 - Disable Dropping of TCP/IP Checksum Error Frames"] #[inline(always)] pub fn dt(&self) -> DT_R { DT_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 25 - Receive Store and Forward"] #[inline(always)] pub fn rsf(&self) -> RSF_R { RSF_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 24 - Disable Flushing of Received Frames"] #[inline(always)] pub fn dff(&self) -> DFF_R { DFF_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 21 - Transmit Store and Forward"] #[inline(always)] pub fn tsf(&self) -> TSF_R { TSF_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Flush Transmit FIFO"] #[inline(always)] pub fn ftf(&self) -> FTF_R { FTF_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 14:16 - Transmit Threshold Control"] #[inline(always)] pub fn ttc(&self) -> TTC_R { TTC_R::new(((self.bits >> 14) & 0x07) as u8) } #[doc = "Bit 13 - Start or Stop Transmission Command"] #[inline(always)] pub fn st(&self) -> ST_R { ST_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bits 11:12 - Threshold for Deactivating Flow Control"] #[inline(always)] pub fn rfd(&self) -> RFD_R { RFD_R::new(((self.bits >> 11) & 0x03) as u8) } #[doc = "Bits 9:10 - Threshold for Activating Flow Control"] #[inline(always)] pub fn rfa(&self) -> RFA_R { RFA_R::new(((self.bits >> 9) & 0x03) as u8) } #[doc = "Bit 7 - Forward Error Frames"] #[inline(always)] pub fn fef(&self) -> FEF_R { FEF_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Forward Undersized Good Frames"] #[inline(always)] pub fn fuf(&self) -> FUF_R { FUF_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Drop Giant Frames"] #[inline(always)] pub fn dgf(&self) -> DGF_R { DGF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 3:4 - Receive Threshold Control"] #[inline(always)] pub fn rtc(&self) -> RTC_R { RTC_R::new(((self.bits >> 3) & 0x03) as u8) } #[doc = "Bit 2 - Operate on Second Frame"] #[inline(always)] pub fn osf(&self) -> OSF_R { OSF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Start or Stop Receive"] #[inline(always)] pub fn sr(&self) -> SR_R { SR_R::new(((self.bits >> 1) & 0x01) != 0) } } impl W { #[doc = "Bit 26 - Disable Dropping of TCP/IP Checksum Error Frames"] #[inline(always)] pub fn dt(&mut self) -> DT_W { DT_W { w: self } } #[doc = "Bit 25 - Receive Store and Forward"] #[inline(always)] pub fn rsf(&mut self) -> RSF_W { RSF_W { w: self } } #[doc = "Bit 24 - Disable Flushing of Received Frames"] #[inline(always)] pub fn dff(&mut self) -> DFF_W { DFF_W { w: self } } #[doc = "Bit 21 - Transmit Store and Forward"] #[inline(always)] pub fn tsf(&mut self) -> TSF_W { TSF_W { w: self } } #[doc = "Bit 20 - Flush Transmit FIFO"] #[inline(always)] pub fn ftf(&mut self) -> FTF_W { FTF_W { w: self } } #[doc = "Bits 14:16 - Transmit Threshold Control"] #[inline(always)] pub fn ttc(&mut self) -> TTC_W { TTC_W { w: self } } #[doc = "Bit 13 - Start or Stop Transmission Command"] #[inline(always)] pub fn st(&mut self) -> ST_W { ST_W { w: self } } #[doc = "Bits 11:12 - Threshold for Deactivating Flow Control"] #[inline(always)] pub fn rfd(&mut self) -> RFD_W { RFD_W { w: self } } #[doc = "Bits 9:10 - Threshold for Activating Flow Control"] #[inline(always)] pub fn rfa(&mut self) -> RFA_W { RFA_W { w: self } } #[doc = "Bit 7 - Forward Error Frames"] #[inline(always)] pub fn fef(&mut self) -> FEF_W { FEF_W { w: self } } #[doc = "Bit 6 - Forward Undersized Good Frames"] #[inline(always)] pub fn fuf(&mut self) -> FUF_W { FUF_W { w: self } } #[doc = "Bit 5 - Drop Giant Frames"] #[inline(always)] pub fn dgf(&mut self) -> DGF_W { DGF_W { w: self } } #[doc = "Bits 3:4 - Receive Threshold Control"] #[inline(always)] pub fn rtc(&mut self) -> RTC_W { RTC_W { w: self } } #[doc = "Bit 2 - Operate on Second Frame"] #[inline(always)] pub fn osf(&mut self) -> OSF_W { OSF_W { w: self } } #[doc = "Bit 1 - Start or Stop Receive"] #[inline(always)] pub fn sr(&mut self) -> SR_W { SR_W { w: self } } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "Sets the Receive and Transmit operation mode and command\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_oper_mode](index.html) module"] pub struct DMA_OPER_MODE_SPEC; impl crate::RegisterSpec for DMA_OPER_MODE_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_oper_mode::R](R) reader structure"] impl crate::Readable for DMA_OPER_MODE_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_oper_mode::W](W) writer structure"] impl crate::Writable for DMA_OPER_MODE_SPEC { type Writer = W; } #[doc = "`reset()` method sets DMA_OPER_MODE to value 0"] impl crate::Resettable for DMA_OPER_MODE_SPEC { #[inline(always)] fn reset_value() -> Self::Ux { 0 } }